-
Notifications
You must be signed in to change notification settings - Fork 5.3k
fix: flaky anti-pattern getText + assert 3 #28062
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
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
||
await driver.waitForSelector({ | ||
tag: 'span', | ||
text: '₱2,500,000.00', |
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.
the conversion value was not mocked before. Now it is, so the value is always the same and we can look for the complete exact text
Builds ready [c66015d]
Page Load Metrics (1918 ± 80 ms)
Bundle size diffs
|
driver.waitForSelector({ | ||
css: '[data-testid="unlock-page-title"]', | ||
text: 'Welcome back!', | ||
}); |
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.
missing await
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.
whoaa nice catch 😍 !! Thank you!! fixed 🙏
Builds ready [8b7e35e]
Page Load Metrics (1936 ± 80 ms)
Bundle size diffs
|
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.
LGTM ! Thanks for the refacto !
Description
Continuing the work of removing the e2e anti-pattern of finding the element and then asserting its text.
There are more occurrences, but this work is split in several PRs, for an easy review and a faster ci.
Once all occurrences have been fixed, we'll be able to merge @HowardBraham 's PR for adding a lint rule which prevents introducing it again.
Related issues
Fixes: (but doesn't yet closes) #19870
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist