-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
test(all): add await to relevant assertions #25527
Conversation
@@ -3,40 +3,36 @@ import { test, Viewports } from '@utils/test/playwright'; | |||
import type { E2EPage } from '@utils/test/playwright'; | |||
|
|||
test.describe('modal: focus trapping', () => { | |||
test.beforeEach(async ({ browserName }, testInfo) => { | |||
test.skip(testInfo.project.metadata.rtl === true, 'This does not test LTR vs. RTL layout.'); | |||
test.skip(browserName === 'firefox', 'Firefox incorrectly allows keyboard focus to move to ion-content'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was flaky before, but now that we have the await
in place it was failing more often. This appears to be a Firefox bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great discovery that these needed to be awaited.
Was the empty file at |
That was for something I was testing, but I forgot to remove the file. It's been removed now. |
Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docs
repo, in a separate PR. See the contributing guide for details.npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Many of our assertions do not have the appropriate
await
causing certain test to be flaky. This is most often seen with focus tests where we need to test focus multiple times in a single test.What is the new behavior?
await
Note that
toMatchSnapshot
does not needawait
as it does not return a promise: https://playwright.dev/docs/test-assertions#screenshot-assertions-to-match-snapshot-1Does this introduce a breaking change?
Other information