diff --git a/src/apps/epic/static/apps/epic/burger-btn.js b/src/apps/epic/static/apps/epic/burger-btn.js index e91b9be..252e8df 100644 --- a/src/apps/epic/static/apps/epic/burger-btn.js +++ b/src/apps/epic/static/apps/epic/burger-btn.js @@ -79,14 +79,21 @@ else _open(); }, { signal: sig }); - // Delegated click on the fan — flash --priRd glow twice when an - // INACTIVE sub-btn is clicked (its feature isn't wired yet). Active - // sub-btns will route to their per-feature handlers in later sprints. + // Delegated click on the fan: + // • INACTIVE sub-btn → flash the --priRd glow twice (no real action + // bound yet for that surface). + // • ACTIVE sub-btn → close the burger fan so the surface's own + // handler (page-level direct listener on the sub-btn) takes over + // w. a clean visual. The per-page handler fires BEFORE this + // delegated one (target-phase before bubble-up), so the action + // already kicked off by the time we close. fan.addEventListener('click', function (e) { e.stopPropagation(); var subBtn = e.target.closest('.burger-fan-btn'); if (!subBtn) return; - if (!subBtn.classList.contains('active')) { + if (subBtn.classList.contains('active')) { + _close(); + } else { _flashInactive(subBtn); } }, { signal: sig }); diff --git a/src/apps/gameboard/tests/integrated/test_views.py b/src/apps/gameboard/tests/integrated/test_views.py index fa5307d..9f7f5c1 100644 --- a/src/apps/gameboard/tests/integrated/test_views.py +++ b/src/apps/gameboard/tests/integrated/test_views.py @@ -1070,10 +1070,11 @@ class MySeaViewTest(TestCase): 'id="id_sea_btn" type="button" class="burger-fan-btn active"', ) - def test_sea_btn_returns_to_inactive_when_hand_complete(self): - """3-card spread w. all 3 positions drawn → hand_complete True → - sea_btn returns to inactive (the AUTO DRAW btn becomes GATE VIEW - + the deck FLIP gets .btn-disabled at this moment).""" + def test_sea_btn_stays_active_when_hand_complete(self): + """Sea_btn STAYS active even after the hand is complete — DEL + + GATE VIEW live inside the modal so the user has to be able to + reopen it after all cards land. Earlier iteration deactivated on + hand_complete; reverted 2026-05-26 to unblock those affordances.""" from apps.epic.models import personal_sig_cards, TarotCard from apps.gameboard.models import MySeaDraw sig = personal_sig_cards(self.user)[0] @@ -1093,17 +1094,18 @@ class MySeaViewTest(TestCase): ], ) response = self.client.get(reverse("my_sea")) - # active class absent self.assertContains( response, - '