Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent c9dd68d890
commit 84aa9a91de
871 changed files with 265870 additions and 27854 deletions
+12 -2
View File
@@ -19,7 +19,7 @@ _UI = (_REPO / "static" / "js" / "ui.js").read_text(encoding="utf-8")
def test_static_modals_expose_dialog_role_and_name():
# Each static tool window must announce itself as a named dialog. These are
# dockable/tiling windows, so they are role="dialog" WITHOUT aria-modal.
for name in ("Brain", "Theme", "Prompt", "Rename session", "Cookbook", "Settings"):
for name in ("Memory", "Theme", "Prompt", "Rename session", "Cookbook", "Settings"):
assert f'role="dialog" aria-label="{name}"' in _INDEX, f"missing dialog role/name for {name!r}"
@@ -46,6 +46,17 @@ def test_styled_confirm_and_prompt_are_modal_dialogs():
assert 'id="styled-prompt-msg"' in _UI
def test_styled_confirm_cancel_or_close_label_is_shifted_without_moving_button():
css = (_REPO / "static" / "style.css").read_text(encoding="utf-8")
assert "cancelLabel.textContent = cancelText;" in _UI
assert "cancelBtn.appendChild(cancelLabel);" in _UI
rule_start = css.index("#styled-confirm-cancel .styled-confirm-cancel-label")
rule = css[rule_start:rule_start + 150]
assert "position:relative;" in rule
assert "top:2px;" in rule
def test_styled_dialogs_manage_focus():
# A dialog is only really accessible if it restores focus to the trigger on
# close and traps Tab while open. Both styledConfirm and styledPrompt should
@@ -63,4 +74,3 @@ def test_toast_has_dismiss_button():
assert "aria-label" in ui
assert "Dismiss" in ui
assert ui.count("toast-close-btn") >= 2