-
Notifications
You must be signed in to change notification settings - Fork 153
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
chore(null): null safety fixes for assorted test helpers #3462
Conversation
state: 'attached', | ||
}); | ||
}))!; |
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 is the most interesting fix. The contract for Playwright's waitForSelector
is that it will throw rather than returning null if it can't find an element, except that if you explicitly pass options like {state: 'detached'}
, then it will return null in the success path. So waitForSelectorInShadowRoot
is allowed to return null (since someone could pass through that option), but waitForShadowRoot
gets to assume that waitForSelector
is not returning null (since it's passing state: 'attached'
always)
"androidSetupStepComponentProvider": Object { | ||
"detect-adb": [Function], | ||
"prompt-locate-adb": [Function], | ||
}, | ||
"closeApp": null, |
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.
Glad to see these going away--it was not a good code smell to have to change a bunch of downstream test classes when adding a field to the properties
Description of changes
This PR fixes all
yarn null:find
issues in common test helpers, plus all filesyarn null:autoadd
picked up.New
yarn null:progress
:Pull request checklist
yarn fastpass
yarn test
)<rootDir>/test-results/unit/coverage
fix:
,chore:
,feat(feature-name):
,refactor:
). SeeCONTRIBUTING.md
.