Repository navigation
Fixes #36379: ProductTour spec waits for the tour's loading mask before reading the step - #36380
Conversation
…re reading the step On a page change the outgoing react-tour can show the next step on the old page and then unmount behind the loading mask. The walk read the last step in that gap, saw no last-step button, and pressed Finish.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
isLastStep counted last-step-button on its own, so a page change that unmounted react-tour after goNext returned read as not the last step. It now waits for a popover and reads it with its button in one evaluate.
Code Review ✅ Approved🟢 Low risk · The Playwright-only synchronization change affects when the ProductTour spec reads steps, with impact limited to test execution rather than application behavior. Test-only fix to VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…re reading the step (backport 2.1 #36380) (#36391) * Fixes #36379: ProductTour spec waits for the tour's loading mask before reading the step On a page change the outgoing react-tour can show the next step on the old page and then unmount behind the loading mask. The walk read the last step in that gap, saw no last-step button, and pressed Finish. (cherry picked from commit 5dc4318) * ProductTour spec reads the last step only once a step is on screen isLastStep counted last-step-button on its own, so a page change that unmounted react-tour after goNext returned read as not the last step. It now waits for a popover and reads it with its button in one evaluate. (cherry picked from commit ae82eca) --------- Co-authored-by: Shrabanti Paul <shrabantipaul@Shrabantis-MacBook-Pro.local>
Describe your changes:
Fixes #36379
Test-only change to
playwright/e2e/Flow/ProductTour.spec.ts: the walk no longer reads the tour's step while react-tour is between pages.Product tour — Classic › walks the Classic pages on recorded data and returns to Homefailed both attempts in this merge-queue run after #36286. The end modal was open on Memories: the walk pressed Next once past the last step, as in #36285, but for a different reason.Cause. When Next moves to another page,
changePagerunsgoToStepin a view transition, and the browser runs it only after it has captured the old page. Meanwhile react-tour advances on its own afterstepWaitTimer(150 ms). On a slow runner the outgoing react-tour therefore shows the next step on the old page, then unmounts behind the loading mask while the new page settles, then mounts again.goNextreturned on the outgoing popover's text, andisLastSteplanded in the unmounted gap:/context-center/overviewlast-step-button, sogoNextreturns/context-center/memories/context-center/memoriesisLastStep→count() = 0, so the walk callsgoNextagain/context-center/memorieslast-step-buttongoNextclicks the Next arrow, now Finish → end modalFix. Two changes in the spec:
goNextalso waits for the loading mask to be gone. The mask is up for exactly the time react-tour is unmounted, since both followreadyStepIndexin the same render, sogoNextreturns on a settled step and not the outgoing popover.isLastStepwaits until a popover is on screen and reads the popover and itslast-step-buttonin onepage.evaluate(review feedback). Checking the mask and then counting the button as two separate reads still left a window where react-tour could unmount between them. While react-tour is unmounted it now waits for the step to come back. If the outgoing popover is still up, it already shows the right step's button, so the answer is right either way.Not in scope
The outgoing react-tour showing the next step on the old page is a product glitch of its own. It isn't changed here.
Type of change:
High-level design:
N/A, small change.
Tests:
Use cases covered
Unit tests
N/A, test-only change.
Integration tests
N/A.
Playwright
Run locally against this branch's UI (Vite on :3010, backend on :8585), with
--retries=0.This PR under 4× CPU throttle: walk passes 10/10.
This PR, whole spec × 10 (
--repeat-each=10 --workers=3): 40/40 passed.yarn lint:playwright: 0 errors.tscon the Playwright project is clean.Checklist:
Fixes <issue-number>: <short explanation>🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the earlier extra-Next race is addressed.Summary
This test-only change makes the Classic tour walk wait through page changes without mistaking an absent popover for another step.
Reviews (2) · Last reviewed commit: "ProductTour spec reads the last step onl..." · Reviewed by Greptile