From a39053d3f6bc4f4c42548a1eee99e0a89c18dde7 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Wed, 27 May 2026 00:19:34 -0400 Subject: [PATCH] =?UTF-8?q?CI=20#345=20fixes:=20bud-kit=20mutual=20exclusi?= =?UTF-8?q?on=20test=20=E2=86=92=20portrait=20viewport;=20carte=20sign-gat?= =?UTF-8?q?e-brief=20wait=20=E2=86=92=20wait=5Ffor=5Fslow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two CI #345 failures addressed: ## test_bud_active_fades_kit_btn (test_core_bud_btn.py) Real regression — earlier sprint scoped `html.bud-open #id_kit_btn { opacity: 0 }` to `@media (orientation: portrait)` (in `_bud.scss`) because in landscape kit_btn sits at the TOP of the right sidebar + bud_panel slides across the BOTTOM, no visual conflict. The default CI landscape viewport (1366x900) rendered the fade rule inert → the kit_btn stayed at opacity 1 → assertEqual(opacity, 0.0) failed. Fix: `BudKitMutualExclusionTest.setUp` now resizes to portrait (800x1200) so the fade rule actually fires. Both `test_bud_active_fades_kit_btn` + `test_kit_active_fades_bud_btn` now exercise the rule in the orientation where it lives. ## test_carte_blanche_equip_and_multi_slot_gatekeeper (test_trinket_carte_blanche.py) CI flake — the test waits up to 10s (`wait_for` default) for `.my-sea-sign-gate-brief` to appear after navigating to /gameboard/. Under CI contention the Brief's DOM-ready handler can land past 10s; CI #345 hit a NoSuchElement timeout. The screendump confirmed the Brief WAS in the DOM, just past the wait window. Fix: bump that one wait to `wait_for_slow` (60s ceiling). Same pattern used elsewhere (Jasmine spec runner, sig select countdown). ## Verification Both fixed tests green locally. No model / view / template touches. Code architected by Disco DeDisco Git commit message Co-Authored-By: Claude Sonnet 4.6 --- src/functional_tests/test_core_bud_btn.py | 10 +++++++++- src/functional_tests/test_trinket_carte_blanche.py | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/functional_tests/test_core_bud_btn.py b/src/functional_tests/test_core_bud_btn.py index e0b66ec..7e291c9 100644 --- a/src/functional_tests/test_core_bud_btn.py +++ b/src/functional_tests/test_core_bud_btn.py @@ -247,10 +247,18 @@ class BudBtnSlideOutTest(FunctionalTest): class BudKitMutualExclusionTest(FunctionalTest): - """When kit btn is active, bud btn fades to 0 — and vice-versa.""" + """When kit btn is active, bud btn fades to 0 — and vice-versa. + + PORTRAIT-only: in landscape kit_btn sits at the TOP of the right + sidebar + bud_panel slides across the BOTTOM, no visual conflict, so + the .bud-open kit fade is `@media (orientation: portrait)`-scoped + (see _bud.scss). The default landscape viewport would render the + rule inert. Resize to portrait so the rule fires.""" def setUp(self): super().setUp() + self.browser.quit() + self.browser = self._make_browser(800, 1200) # portrait self.gamer = User.objects.create(email="bud@test.io") self.post = _seed_a_post(self.gamer) self.create_pre_authenticated_session("bud@test.io") diff --git a/src/functional_tests/test_trinket_carte_blanche.py b/src/functional_tests/test_trinket_carte_blanche.py index af8fd34..02edb6c 100644 --- a/src/functional_tests/test_trinket_carte_blanche.py +++ b/src/functional_tests/test_trinket_carte_blanche.py @@ -91,7 +91,10 @@ class CarteBlancheTest(FunctionalTest): # version of the test had a 5+ second hover/wait at step 2 (Free # Token tooltip — now removed) that masked the race; without that # wait, we have to explicitly dismiss the banner before proceeding. - self.wait_for( + # `wait_for_slow` (60s ceiling) — under CI contention the Brief's + # DOM-ready handler can land past wait_for's 10s default; CI #345 + # hit this exact NoSuchElement timeout. + self.wait_for_slow( lambda: self.browser.find_element(By.CSS_SELECTOR, ".my-sea-sign-gate-brief") ) self.browser.find_element(