added type='button' to both guard portal btns so firefox won't normalize to type='submit'; fixed several FTs for new click-guard functionality on Role card select & room gear menu DEL & BYE btns; several restorations to landscape breakpoint incl. logged-ion display_name, copyright info; provided title to room_scroll.html; a slurry of other minor fixes
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Disco DeDisco
2026-03-23 19:31:57 -04:00
parent eecb6c2be6
commit 5607f70852
15 changed files with 365 additions and 65 deletions

View File

@@ -118,6 +118,13 @@ class FunctionalTest(StaticLiveServerTestCase):
)
)
def confirm_guard(self, browser=None):
b = browser or self.browser
def _click():
btn = b.find_element(By.CSS_SELECTOR, "#id_guard_portal.active .guard-yes")
b.execute_script("arguments[0].click()", btn)
self.wait_for(_click)
@wait
def wait_to_be_logged_in(self, email):
self.browser.find_element(By.CSS_SELECTOR, "#id_logout"),
@@ -199,6 +206,13 @@ class ChannelsFunctionalTest(ChannelsLiveServerTestCase):
raise e
time.sleep(0.5)
def confirm_guard(self, browser=None):
b = browser or self.browser
def _click():
btn = b.find_element(By.CSS_SELECTOR, "#id_guard_portal.active .guard-yes")
b.execute_script("arguments[0].click()", btn)
self.wait_for(_click)
def create_pre_authenticated_session(self, email):
if self.test_server:
session_key = create_session_on_server(self.test_server, email)

View File

@@ -209,6 +209,7 @@ class GatekeeperTest(FunctionalTest):
self.wait_for(
lambda: self.browser.find_element(By.CSS_SELECTOR, ".btn-danger")
).click()
self.confirm_guard()
self.wait_for(lambda: self.assertEqual(
self.browser.current_url, self.live_server_url + "/gameboard/"
@@ -248,6 +249,7 @@ class GatekeeperTest(FunctionalTest):
self.wait_for(
lambda: self.browser.find_element(By.CSS_SELECTOR, ".btn-abandon")
).click()
self.confirm_guard()
self.wait_for(lambda: self.assertEqual(
self.browser.current_url, self.live_server_url + "/gameboard/"

View File

@@ -57,5 +57,6 @@ class LoginTest(FunctionalTest):
self.wait_to_be_logged_in(email=TEST_EMAIL)
self.browser.find_element(By.CSS_SELECTOR, "#id_logout").click()
self.confirm_guard()
self.wait_to_be_logged_out(email=TEST_EMAIL)

View File

@@ -206,6 +206,7 @@ class RoleSelectTest(FunctionalTest):
# 5. Click first card to select it
cards[0].click()
self.confirm_guard()
# 6. Modal closes
self.wait_for(
@@ -436,6 +437,7 @@ class RoleSelectTest(FunctionalTest):
).click()
self.wait_for(lambda: self.browser.find_element(By.ID, "id_role_select"))
self.browser.find_element(By.CSS_SELECTOR, "#id_role_select .card").click()
self.confirm_guard()
# No WS — only the JS fix can make this transition happen
self.wait_for(
@@ -475,6 +477,7 @@ class RoleSelectTest(FunctionalTest):
).click()
self.wait_for(lambda: self.browser.find_element(By.ID, "id_role_select"))
self.browser.find_element(By.CSS_SELECTOR, "#id_role_select .card").click()
self.confirm_guard()
# Wait for fan to close (selectRole closes it synchronously)
self.wait_for(
@@ -588,6 +591,7 @@ class RoleSelectChannelsTest(ChannelsFunctionalTest):
self.browser2.find_element(By.CSS_SELECTOR, ".card-stack").click()
self.wait_for(lambda: self.browser2.find_element(By.ID, "id_role_select"))
self.browser2.find_element(By.CSS_SELECTOR, "#id_role_select .card").click()
self.confirm_guard(browser=self.browser2)
# 3. Watcher's seat arc moves to slot 2 — no page refresh
self.wait_for(lambda: self.browser.find_element(
@@ -656,6 +660,7 @@ class RoleSelectChannelsTest(ChannelsFunctionalTest):
self.browser.find_element(By.CSS_SELECTOR, ".card-stack").click()
self.wait_for(lambda: self.browser.find_element(By.ID, "id_role_select"))
self.browser.find_element(By.CSS_SELECTOR, "#id_role_select .card").click()
self.confirm_guard()
# 4. Friend's stack becomes eligible via WebSocket — no page refresh
self.wait_for(lambda: self.browser2.find_element(