Skip to content

chore: race snapshot against dialog #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Jun 26, 2025

A dialog that pops up while we're taking a snapshot, or while context.waitForTimeout is running, blocks everything, leading to #595.
We fix that by wrapping more of our code with _raceAgainstModalDialogs.

Closes #595

@Skn0tt Skn0tt requested a review from pavelfeldman June 26, 2025 09:12
@Skn0tt Skn0tt self-assigned this Jun 26, 2025
element: 'Login',
ref: 'e3',
},
})).toContainTextContent(`"alert" dialog`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear why this test would work. Click will return immediately, snapshot will be empty. Then the dialog will appear.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It passes because of our 1s wait:

await context.waitForTimeout(1000);

@Skn0tt
Copy link
Member Author

Skn0tt commented Jul 2, 2025

Closing as stale.

@Skn0tt Skn0tt closed this Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: dialog blocks snapshot
2 participants