diff --git a/src/functional_tests/test_game_my_sea.py b/src/functional_tests/test_game_my_sea.py index 3050f44..9a91fd2 100644 --- a/src/functional_tests/test_game_my_sea.py +++ b/src/functional_tests/test_game_my_sea.py @@ -969,23 +969,26 @@ class MySeaCardDrawTest(FunctionalTest): # ── Test 6 ─────────────────────────────────────────────────────────────── - def test_del_btn_is_disabled_until_hand_complete(self): - """Iter-4c — DEL btn renders `.btn-disabled` server-side until - the hand is complete (per spec: the 24h free-draw quota is - committed at first-card-draw, can't be refunded by an early - DEL). Once the hand fills, JS removes `.btn-disabled` from DEL.""" + def test_del_btn_is_disabled_until_first_draw(self): + """User spec 2026-05-26: DEL btn renders `.btn-disabled` only + UNTIL the first card lands (was: until hand complete). The 24h + free-draw quota is still committed at first-card-draw + can't be + refunded by an early DEL, but the user can DEL the in-progress + hand to start over within the cycle. JS `_setHasDrawn(true)` fires + on the first deposit + at the AUTO DRAW POST-commit moment.""" picker = self._enter_picker_phase() delbtn = picker.find_element(By.CSS_SELECTOR, "#id_sea_del") + # Pre-draw — disabled. self.assertIn("btn-disabled", delbtn.get_attribute("class")) self._draw_one(picker, "levity") - # Mid-draw — still disabled. - self.assertIn("btn-disabled", delbtn.get_attribute("class")) - self._draw_one(picker, "levity") - self._draw_one(picker, "gravity") - # Hand complete — DEL un-disables (clicking now opens guard portal). + # First card landed — DEL un-disables immediately. self.wait_for( lambda: self.assertNotIn("btn-disabled", delbtn.get_attribute("class")) ) + # Subsequent draws + completion — DEL stays enabled. + self._draw_one(picker, "levity") + self._draw_one(picker, "gravity") + self.assertNotIn("btn-disabled", delbtn.get_attribute("class")) # ── Test 7 ─────────────────────────────────────────────────────────────── @@ -1846,9 +1849,12 @@ class MySeaGearBtnTest(FunctionalTest): lambda: self.browser.find_element(By.ID, "id_my_sea_menu") ) self.assertEqual(menu.value_of_css_property("display"), "block") - # NVM link present, DEL + BYE deliberately absent. + # NVM btn present, DEL + BYE deliberately absent. NVM is a `