From 5e3a68163eee2675f63491176be77dbaaa4ed1e8 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 28 Jun 2026 19:48:46 +0200 Subject: [PATCH] fix(ui-test): ensure app unconfigured before setup flow tests Add Verify App Is Unconfigured keyword with retry logic. Update Test Setup to reset app state before each setup flow test. Remove stale Task 25 docs from tasks.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Docs/tasks.md | 14 -------------- tests/robot/resources/common.resource | 13 +++++++++++++ tests/robot/ui/setup_flow.robot | 4 +++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Docs/tasks.md b/Docs/tasks.md index 02ab82f..0bec265 100644 --- a/Docs/tasks.md +++ b/Docs/tasks.md @@ -1,17 +1,3 @@ -## Task 25: UI Setup Flow - Password Strength Strong - -**Suite:** `Robot.Ui.Setup Flow` -**Test:** `Password Strength Strong` -**Result:** FAIL -**Error:** `TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible` - -**Instructions:** -- Same root cause as Task 22: the setup form is not visible. -- Fix the suite setup so the app is in an unconfigured state before each setup flow test. -- Ensure `#setup-form` is rendered when navigating to the setup page. - ---- - ## Task 26: UI Setup Flow - Setup Form Validation Empty Password **Suite:** `Robot.Ui.Setup Flow` diff --git a/tests/robot/resources/common.resource b/tests/robot/resources/common.resource index 34de18b..caf9ce6 100644 --- a/tests/robot/resources/common.resource +++ b/tests/robot/resources/common.resource @@ -96,6 +96,19 @@ Is Auth Configured ${configured_val}= Set Variable ${configured}[0] RETURN ${configured_val} +Verify App Is Unconfigured + [Documentation] Verify the app is in unconfigured state, retrying reset if needed. + FOR ${i} IN RANGE 3 + ${configured}= Is Auth Configured + IF not ${configured} + RETURN + END + # Not configured but Is Auth Configured returned True - reset again + Reset Application State + Sleep 1s + END + Fail App still configured after 3 reset attempts + Setup Master Password [Documentation] Configure the master password via the setup endpoint. ${payload}= Create Dictionary diff --git a/tests/robot/ui/setup_flow.robot b/tests/robot/ui/setup_flow.robot index 4185c1e..ffc7c13 100644 --- a/tests/robot/ui/setup_flow.robot +++ b/tests/robot/ui/setup_flow.robot @@ -20,7 +20,9 @@ Resource ${CURDIR}/../resources/common.resource Resource ${CURDIR}/../resources/ui_keywords.resource Test Setup Run Keywords -... Open Browser To Page /setup +... Reset Application State +... AND Verify App Is Unconfigured +... AND Open Browser To Page /setup ... AND Wait For Elements State id=setup-form visible timeout=5s Test Teardown Run Keywords