my-sea polish v2: portrait .my-sea-picker stacks form col BELOW the cross (mirrors gameroom SEA SELECT modal) + sync MySeaGatekeeperPageTest.test_paid_draw_commits_token_and_redirects_to_picker w. iter-6c row-delete + ?phase=picker semantics (was pinning iter-6a behavior; pipeline #319 caught it)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1337,9 +1337,13 @@ class MySeaGatekeeperPageTest(FunctionalTest):
|
||||
|
||||
def test_paid_draw_commits_token_and_redirects_to_picker(self):
|
||||
"""PAID DRAW commits the deposited token (FREE token gets
|
||||
consumed → user's token count drops by 1); server resets the
|
||||
MySeaDraw row (hand=[], created_at=now, deposit cleared); user
|
||||
lands back on /gameboard/my-sea/ ready to draw a fresh hand."""
|
||||
consumed → user's token count drops by 1); iter-6c spec then
|
||||
DROPS the active_draw row entirely + redirects to /gameboard/
|
||||
my-sea/?phase=picker so the user lands directly in the picker
|
||||
ready to draw. Previously the row was preserved w. reset
|
||||
created_at — that looped the user back to GATE VIEW
|
||||
(`quota_spent=True` w. row present). See
|
||||
[[sprint-my-sea-iter-6c-may20]] for the rationale."""
|
||||
from apps.gameboard.models import MySeaDraw
|
||||
from apps.lyric.models import Token
|
||||
self._save_empty_hand_draw()
|
||||
@@ -1360,19 +1364,23 @@ class MySeaGatekeeperPageTest(FunctionalTest):
|
||||
)
|
||||
)
|
||||
paid_draw.click()
|
||||
# Redirect lands on /gameboard/my-sea/ (landing or picker).
|
||||
# Redirect lands on /gameboard/my-sea/?phase=picker so the user
|
||||
# drops straight into the picker (no FREE-DRAW landing click).
|
||||
self.wait_for(
|
||||
lambda: self.assertIn("/gameboard/my-sea/", self.browser.current_url)
|
||||
lambda: self.assertIn(
|
||||
"/gameboard/my-sea/?phase=picker", self.browser.current_url
|
||||
)
|
||||
)
|
||||
# FREE token consumed.
|
||||
self.assertEqual(
|
||||
Token.objects.filter(user=self.gamer, token_type=Token.FREE).count(),
|
||||
free_count_before - 1,
|
||||
)
|
||||
# MySeaDraw row: hand reset to empty, deposit cleared, fresh quota.
|
||||
draw = MySeaDraw.objects.get(user=self.gamer)
|
||||
self.assertEqual(draw.hand, [])
|
||||
self.assertIsNone(draw.deposit_token_id)
|
||||
# Row dropped — `active_draw is None` is the signal that lets
|
||||
# the my_sea view honour the `?phase=picker` override.
|
||||
self.assertFalse(
|
||||
MySeaDraw.objects.filter(user=self.gamer).exists()
|
||||
)
|
||||
|
||||
|
||||
class MySeaLandingPaidDrawTest(FunctionalTest):
|
||||
|
||||
@@ -305,6 +305,15 @@ body.page-gameboard {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
|
||||
// Portrait — stack the cross spread above the form col (mirrors the
|
||||
// gameroom SEA SELECT modal's `@media (max-width: 600px)` stack
|
||||
// pattern in `_card-deck.scss`). Landscape keeps the side-by-side
|
||||
// layout since horizontal real-estate is the abundant axis there.
|
||||
// User-spec 2026-05-20.
|
||||
@media (orientation: portrait) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
// .my-sea-cross renders all 6 surrounding positions (crown/leave/lay/
|
||||
|
||||
Reference in New Issue
Block a user