extensive refactor push to continue to liberate applets from dashboard; new _applets.html & .gear.html template partials for use across all -board views; all applets.html sections have been liberated into their own _applet-<applet-name>.html template partials in their respective templates/apps/*board/_partials/ dirs; gameboard.html & home.html greatly simplified; .gear-btn describes gear menu now, #id_<*board nickname>*gear IDs abandoned; as such, .gear-btn styling moved from _dashboard.scss to _base.scss; new applets.js file contains related initGearMenus scripts, which no longer waits for window reload; new apps.applets.utils file manages applet_context() fn; new gameboard.js file but currently empty (false start); updates across all sorts of ITs & dash- & gameboard FTs

This commit is contained in:
Disco DeDisco
2026-03-09 21:13:35 -04:00
parent 97601586c5
commit 47d84b6bf2
31 changed files with 443 additions and 203 deletions

View File

@@ -54,16 +54,16 @@ class DashboardMaintenanceTest(FunctionalTest):
self.browser.find_element(By.ID, "id_applet_username")
self.browser.find_element(By.ID, "id_applet_palette")
# 3. Click el w. id="id_dash_gear"
dash_gear = self.browser.find_element(By.ID, "id_dash_gear")
dash_gear = self.browser.find_element(By.CSS_SELECTOR, ".gear-btn")
dash_gear.click()
# 4. A menu appears; wait_for el w. id="id_applet_menu"
# 4. A menu appears; wait_for el w. id="id_dash_applet_menu"
self.wait_for(
lambda: self.assertTrue(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
# 5. Find two checkboxes in menu, name="username" & name="palette"; assert both .is_selected()
menu = self.browser.find_element(By.ID, "id_applet_menu")
menu = self.browser.find_element(By.ID, "id_dash_applet_menu")
username_cb = menu.find_element(By.CSS_SELECTOR, '[name="applets"][value="username"]')
palette_cb = menu.find_element(By.CSS_SELECTOR, '[name="applets"][value="palette"]')
self.assertTrue(username_cb.is_selected())
@@ -76,7 +76,7 @@ class DashboardMaintenanceTest(FunctionalTest):
menu.find_element(By.CSS_SELECTOR, '[type="submit"]').click()
self.wait_for(
lambda: self.assertFalse(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
# 8. wait_for palette applet to be gone
@@ -93,10 +93,10 @@ class DashboardMaintenanceTest(FunctionalTest):
dash_gear.click()
self.wait_for(
lambda: self.assertTrue(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
menu = self.browser.find_element(By.ID, "id_applet_menu")
menu = self.browser.find_element(By.ID, "id_dash_applet_menu")
palette_cb = menu.find_element(By.CSS_SELECTOR, '[name="applets"][value="palette"]')
self.assertFalse(palette_cb.is_selected())
# 11. Click it to re-check box; submit
@@ -106,7 +106,7 @@ class DashboardMaintenanceTest(FunctionalTest):
# 12. wait_for id_applet_palette to reappear
self.wait_for(
lambda: self.assertFalse(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
self.wait_for(
@@ -125,19 +125,19 @@ class AppletMenuDismissTest(FunctionalTest):
self.browser.get(self.live_server_url)
def _open_menu(self):
self.browser.find_element(By.ID, "id_dash_gear").click()
self.browser.find_element(By.CSS_SELECTOR, ".gear-btn").click()
self.wait_for(
lambda: self.assertTrue(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
def test_gear_click_toggles_menu_closed(self):
self._open_menu()
self.browser.find_element(By.ID, "id_dash_gear").click()
self.browser.find_element(By.CSS_SELECTOR, ".gear-btn").click()
self.wait_for(
lambda: self.assertFalse(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
@@ -146,7 +146,7 @@ class AppletMenuDismissTest(FunctionalTest):
self.browser.find_element(By.ID, "id_applet_menu_cancel").click()
self.wait_for(
lambda: self.assertFalse(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)
@@ -155,6 +155,6 @@ class AppletMenuDismissTest(FunctionalTest):
self.browser.find_element(By.TAG_NAME, "h2").click()
self.wait_for(
lambda: self.assertFalse(
self.browser.find_element(By.ID, "id_applet_menu").is_displayed()
self.browser.find_element(By.ID, "id_dash_applet_menu").is_displayed()
)
)