diff options
Diffstat (limited to 'web/tests')
| -rw-r--r-- | web/tests/test_account_and_store.py | 6 | ||||
| -rw-r--r-- | web/tests/test_typing_flow.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/web/tests/test_account_and_store.py b/web/tests/test_account_and_store.py index ce1b9c9..f7c219c 100644 --- a/web/tests/test_account_and_store.py +++ b/web/tests/test_account_and_store.py @@ -40,7 +40,11 @@ def run(): # typing screen itself, not just in the store's own UI. page.click('[data-action="menu"]') page.wait_for_timeout(300) - page.click('[data-action="start"]') + # Single Player opens the mode picker; choosing a mode starts the + # test. It used to start the last-used mode on one click. + page.click('[data-action="pick-mode"]') + page.wait_for_selector('.sp-popover .mode-popover-item[data-mode="quotes"]', timeout=10000) + page.click('.sp-popover .mode-popover-item[data-mode="quotes"]') page.wait_for_timeout(500) caret_color = page.evaluate( "() => getComputedStyle(document.querySelector('.typing-game')).getPropertyValue('--caret-color').trim()" diff --git a/web/tests/test_typing_flow.py b/web/tests/test_typing_flow.py index 251ff56..44bdc28 100644 --- a/web/tests/test_typing_flow.py +++ b/web/tests/test_typing_flow.py @@ -19,7 +19,11 @@ def run(): # asserting on the exact source casing. assert "typerpunk" in page.locator(".main-menu h1").inner_text().lower() - page.click('[data-action="start"]') + # Single Player opens the mode picker; choosing a mode starts the + # test. It used to start the last-used mode on one click. + page.click('[data-action="pick-mode"]') + page.wait_for_selector('.sp-popover .mode-popover-item[data-mode="quotes"]', timeout=10000) + page.click('.sp-popover .mode-popover-item[data-mode="quotes"]') page.wait_for_selector(".typing-game", timeout=10000) input_el = page.locator(".typing-input") |