Skip to content

Fixes #36379: ProductTour spec waits for the tour's loading mask before reading the step - #36380

Merged
shrabantipaul-collate merged 2 commits into
mainfrom
shrabantipaul-collate/openmetadata-run-failure
Oct 28, 2026
Merged

shrabantipaul-collate merged 2 commits into
mainfrom
shrabantipaul-collate/openmetadata-run-failure

Conversation

@shrabantipaul-collate

@shrabantipaul-collate shrabantipaul-collate commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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 Home failed 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, changePage runs goToStep in a view transition, and the browser runs it only after it has captured the old page. Meanwhile react-tour advances on its own after stepWaitTimer (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. goNext returned on the outgoing popover's text, and isLastStep landed in the unmounted gap:

t (ms) URL event
560252 /context-center/overview popover reads step 9 (Memories) with last-step-button, so goNext returns
560462 /context-center/memories react-tour unmounted, loading mask up
560465 /context-center/memories isLastStep → count() = 0, so the walk calls goNext again
560853 /context-center/memories react-tour mounted again with last-step-button
560882 goNext clicks the Next arrow, now Finish → end modal

Fix. Two changes in the spec:

  1. goNext also waits for the loading mask to be gone. The mask is up for exactly the time react-tour is unmounted, since both follow readyStepIndex in the same render, so goNext returns on a settled step and not the outgoing popover.
  2. isLastStep waits until a popover is on screen and reads the popover and its last-step-button in one page.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:

  • Bug fix

High-level design:

N/A, small change.

Tests:

Use cases covered

  • The Classic walk stops on the last step (Memories) even when the page change's view transition is slower than react-tour's step wait (reproduced locally with 4× CPU throttling).

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.

fix-throttled

This PR, whole spec × 10 (--repeat-each=10 --workers=3): 40/40 passed.

fix-full

yarn lint:playwright: 0 errors. tsc on the Playwright project is clean.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence 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.

  • The Classic tour test waits for page changes before checking its last step.

Reviews (2) · Last reviewed commit: "ProductTour spec reads the last step onl..." · Reviewed by Greptile

…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.
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 skip-pr-checks label.

@shrabantipaul-collate shrabantipaul-collate added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Oct 27, 2026
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.
@gitar-bot

gitar-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
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 playwright/e2e/Flow/ProductTour.spec.ts so goNext also waits for the tour-step-loading mask to clear before returning, preventing the Classic walk from reading the last step during the react-tour unmount gap. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@shrabantipaul-collate
shrabantipaul-collate added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 49bb1af Oct 28, 2026
81 of 85 checks passed
@shrabantipaul-collate
shrabantipaul-collate deleted the shrabantipaul-collate/openmetadata-run-failure branch October 28, 2026 08:41
shrabantipaul-collate added a commit that referenced this pull request Oct 28, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Playwright: ProductTour Classic walk reads the last step while react-tour remounts on a page change

3 participants