diff --git a/.maestro/flows/demo.yaml b/.maestro/flows/demo.yaml index dd0fec7..4ddbd97 100644 --- a/.maestro/flows/demo.yaml +++ b/.maestro/flows/demo.yaml @@ -43,10 +43,14 @@ name: Demo mode - offline scripted walkthrough (no server, zero-server activatio - takeScreenshot: demo-S2_demo_screen_opened # Scripted conversation renders through the real chat components. +# Maestro `text` matches the element's FULL text as a regex, so a phrase +# taken from a longer message must be wrapped in `.*…*` (the user message is +# a full sentence, not the bare phrase). Verified against a CI run where the +# demo screen rendered correctly but this bare-substring assert failed. - assertVisible: id: "chat-bubble-user" - assertVisible: - text: "login button" + text: ".*login button.*" - assertVisible: id: "chat-bubble-assistant" - assertVisible: @@ -54,14 +58,24 @@ name: Demo mode - offline scripted walkthrough (no server, zero-server activatio - takeScreenshot: demo-S3_conversation # Tool call card is collapsed by default (same behavior as a real session) — -# expand it to reveal the diff. +# tapping it expands the card, which renders the diff DOWNWARD below the +# header. Because the card is scrolled to near the bottom of the viewport to +# tap it, the expanded diff opens off-screen — so scroll again to bring the +# diff into view before asserting (assertVisible does not auto-scroll). +# Verified from a CI failure screenshot where the demo rendered correctly but +# diff-view-scroll sat below the fold. - scrollUntilVisible: element: - text: "Edit src/components/LoginButton.tsx" + text: ".*Edit src/components/LoginButton.tsx.*" direction: DOWN timeout: 10000 - tapOn: - text: "Edit src/components/LoginButton.tsx" + text: ".*Edit src/components/LoginButton.tsx.*" +- scrollUntilVisible: + element: + id: "diff-view-scroll" + direction: DOWN + timeout: 10000 - assertVisible: id: "diff-view-scroll" - takeScreenshot: demo-S4_diff_view @@ -76,8 +90,16 @@ name: Demo mode - offline scripted walkthrough (no server, zero-server activatio - takeScreenshot: demo-S5_permission_prompt - tapOn: text: "Allow" +# Approving swaps the prompt for a completion message that renders below the +# fold; scroll to it (full sentence begins "Tests passed — …", matched as a +# substring regex). +- scrollUntilVisible: + element: + text: ".*Tests passed.*" + direction: DOWN + timeout: 10000 - assertVisible: - text: "Tests passed" + text: ".*Tests passed.*" - takeScreenshot: demo-S6_permission_approved # Closing CTA routes to the REAL connect form, not a dead link.