Skip to content
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

Use Playwright assertions for autofocus #1219

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

seanpdoyle
Copy link
Contributor

Closes #1154

Replace bespoke CSS selector-based assertions with Playwright's built-in toBeFocused assertion.

Like other assertions, toBeFocused will wait and retry for a period of time, which makes nextBeat calls unnecessary.

Closes [hotwired#1154][]

Replace bespoke CSS selector-based assertions with Playwright's built-in
[toBeFocused](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-focused)
assertion.

Like other assertions, `toBeFocused` will wait and retry for a period of
time, which makes `nextBeat` calls unnecessary.

[hotwired#1154]: hotwired#1154
@afcapel afcapel merged commit 8c66861 into hotwired:main Mar 5, 2024
1 check passed
@afcapel
Copy link
Collaborator

afcapel commented Mar 5, 2024

Nice, thanks @seanpdoyle !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Autofocus tests are flaky
2 participants