PM-39413 Update BIT tests to bypass new prompt#505
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed a single-file change to Code Review DetailsNo blocking findings. The change is focused, follows the existing |
| await skipButton.waitFor(defaultWaitForOptions); | ||
| await skipButton.click(); |
There was a problem hiding this comment.
Details and fix
skipButton.waitFor(defaultWaitForOptions) uses state: "visible" with a 15s timeout. If the default-password-manager prompt is not rendered — e.g. an older build artifact, or a build/flag state where this new prompt does not appear — waitFor throws a TimeoutError, failing prepareEnvironment and breaking the entire test (and benchmark) setup rather than the prompt being optional.
This suite is designed to run against varying real MV3 builds (see the prod/CI note on closeWelcomePage), and the codebase already handles mid-rollout UI variability defensively — see loginToVault using .or() at lines 113-120 with a comment explaining the rollout state.
Consider tolerating the prompt's absence, e.g.:
const skipButton = testPage
.locator("autofill-default-password-manager-prompt")
.getByRole("button", { name: "Skip" });
if (await skipButton.isVisible().catch(() => false)) {
await skipButton.click();
}or wrapping the existing waitFor/click in a try/catch that swallows the timeout, so the prompt is treated as optional rather than required.
If the prompt is in fact guaranteed to be present in every build this suite runs against, this can be dismissed.
| .locator("autofill-default-password-manager-prompt") | ||
| .getByRole("button", { name: "Skip" }); | ||
|
|
||
| await skipButton.waitFor(defaultWaitForOptions); |
There was a problem hiding this comment.
Is it guaranteed to appear every time (not gated by a feature flag or other server config)?
There was a problem hiding this comment.
We could also enable disabling the prompt via dev flag, a la skipWelcomeOnInstall in the clients project
There was a problem hiding this comment.
After bitwarden/clients#21391 merges, the prompt should appear on every new install. We currently aren't feature flagging this work but it may make sense to since it could potentially be blocking for a login
There was a problem hiding this comment.
If you flag it on the client, you'll need to come back here and update the expectation to be optional (not fail) if the prompt doesn't appear within the timeout
jprusik
left a comment
There was a problem hiding this comment.
Approving assuming it will be merged alongside the corresponding client changes
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39413
📔 Objective
The new default password manager prompt on new installs is blocking setup, this change will skip the prompt. We can later expand to testing the prompt if we find value in doing so.
Note
This will be merged after the permissions prompt pr