#54377: test: wait for the WebAuthn PIN warning instead of sampling console messages
Merged
Description of Change
Follow-up to #54355. The two "WebAuthn request that needs a security key PIN" specs asserted that the "does not support WebAuthn PIN entry" console warning had already been collected by the time executeJavaScript() resolved with the rejected promise. The console-message event can arrive after that, so the assertion failed intermittently (seen 3/3 on a macOS arm64 MAS shard while the other shards passed, with the warning logged right after the failure).
The specs now start waiting for that console message with emittedUntil before issuing the request and await it after checking the rejection, so ordering between the two no longer matters.
Checklist
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
Release Notes
Notes: none
Backports
43-x-y
PendingWaiting for a manual backport
44-x-y
PendingWaiting for a manual backport
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron