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):
|
def test_paid_draw_commits_token_and_redirects_to_picker(self):
|
||||||
"""PAID DRAW commits the deposited token (FREE token gets
|
"""PAID DRAW commits the deposited token (FREE token gets
|
||||||
consumed → user's token count drops by 1); server resets the
|
consumed → user's token count drops by 1); iter-6c spec then
|
||||||
MySeaDraw row (hand=[], created_at=now, deposit cleared); user
|
DROPS the active_draw row entirely + redirects to /gameboard/
|
||||||
lands back on /gameboard/my-sea/ ready to draw a fresh hand."""
|
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.gameboard.models import MySeaDraw
|
||||||
from apps.lyric.models import Token
|
from apps.lyric.models import Token
|
||||||
self._save_empty_hand_draw()
|
self._save_empty_hand_draw()
|
||||||
@@ -1360,19 +1364,23 @@ class MySeaGatekeeperPageTest(FunctionalTest):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
paid_draw.click()
|
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(
|
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.
|
# FREE token consumed.
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
Token.objects.filter(user=self.gamer, token_type=Token.FREE).count(),
|
Token.objects.filter(user=self.gamer, token_type=Token.FREE).count(),
|
||||||
free_count_before - 1,
|
free_count_before - 1,
|
||||||
)
|
)
|
||||||
# MySeaDraw row: hand reset to empty, deposit cleared, fresh quota.
|
# Row dropped — `active_draw is None` is the signal that lets
|
||||||
draw = MySeaDraw.objects.get(user=self.gamer)
|
# the my_sea view honour the `?phase=picker` override.
|
||||||
self.assertEqual(draw.hand, [])
|
self.assertFalse(
|
||||||
self.assertIsNone(draw.deposit_token_id)
|
MySeaDraw.objects.filter(user=self.gamer).exists()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class MySeaLandingPaidDrawTest(FunctionalTest):
|
class MySeaLandingPaidDrawTest(FunctionalTest):
|
||||||
|
|||||||
@@ -305,6 +305,15 @@ body.page-gameboard {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 1rem;
|
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/
|
// .my-sea-cross renders all 6 surrounding positions (crown/leave/lay/
|
||||||
|
|||||||
Reference in New Issue
Block a user