CI #345 fixes: bud-kit mutual exclusion test → portrait viewport; carte sign-gate-brief wait → wait_for_slow

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 <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-27 00:19:34 -04:00
parent 6fbeed78d8
commit a39053d3f6
2 changed files with 13 additions and 2 deletions

View File

@@ -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")

View File

@@ -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(