Skip to content

PM-39413 Update BIT tests to bypass new prompt#505

Merged
dan-livefront merged 3 commits into
mainfrom
PM-39413-update-bit-tests-to-bypass-new-prompt
Jul 1, 2026
Merged

PM-39413 Update BIT tests to bypass new prompt#505
dan-livefront merged 3 commits into
mainfrom
PM-39413-update-bit-tests-to-bypass-new-prompt

Conversation

@dan-livefront

@dan-livefront dan-livefront commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🎟️ 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


Test all run against [the permissions prompt pr](https://github.com/bitwarden/clients/pull/21391) : 

https://github.com/bitwarden/browser-interactions-testing/actions/runs/28030173339


Test with flags run against [the permissions prompt pr](https://github.com/bitwarden/clients/pull/21391) : 

https://github.com/bitwarden/browser-interactions-testing/actions/runs/28030208742

@dan-livefront dan-livefront self-assigned this Jun 23, 2026
@dan-livefront dan-livefront requested a review from a team as a code owner June 23, 2026 13:31
@dan-livefront dan-livefront requested a review from blackwood June 23, 2026 13:31
@dan-livefront dan-livefront added the ai-review Request a Claude code review label Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed a single-file change to fixtures/extension-setup.ts adding dismissDefaultPasswordManagerPrompt, wired into prepareEnvironment after the welcome carousel. The implementation treats the new default-password-manager prompt as optional: waitForURL matches either the prompt URL or login, then early-returns when not on the prompt page and only clicks Skip when the prompt is actually present. This resolves the earlier hard-wait concern and the reviewer request to keep the expectation optional if the prompt is feature-flagged off.

Code Review Details

No blocking findings. The change is focused, follows the existing defaultGotoOptions / defaultWaitForOptions conventions, and correctly tolerates the prompt being absent.

Comment on lines +36 to +37
await skipButton.waitFor(defaultWaitForOptions);
await skipButton.click();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: This hard-waits for the prompt, making setup fail on builds where it is absent.

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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it guaranteed to appear every time (not gated by a feature flag or other server config)?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also enable disabling the prompt via dev flag, a la skipWelcomeOnInstall in the clients project

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
jprusik previously approved these changes Jun 23, 2026

@jprusik jprusik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving assuming it will be merged alongside the corresponding client changes

@dan-livefront dan-livefront enabled auto-merge (squash) July 1, 2026 16:59
@dan-livefront dan-livefront disabled auto-merge July 1, 2026 17:01
@dan-livefront dan-livefront merged commit 4daee48 into main Jul 1, 2026
8 of 12 checks passed
@dan-livefront dan-livefront deleted the PM-39413-update-bit-tests-to-bypass-new-prompt branch July 1, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants