Skip to content

console: CNS-56 Add 'Create App Password' button to App Password page. - #38591

Open
jdonelson wants to merge 1 commit into
mainfrom
jdonelson/CNS-56_create-app-password-button
Open

console: CNS-56 Add 'Create App Password' button to App Password page.#38591
jdonelson wants to merge 1 commit into
mainfrom
jdonelson/CNS-56_create-app-password-button

Conversation

@jdonelson

Copy link
Copy Markdown
Contributor

Motivation

Add a button that launches the "Create App Password" modal. The trigger was previously hidden in the "Create New" menu, generating feedback from users who weren't able to find it.

Closes CNS-56

Description

Button is hidden for users in Impersonation mode.

Screenshot 2026-08-31 at 4 50 53 PM

Verification

Added automated tests that confirm expected behavior and confirm that it is hidden for impersonation users.

@jdonelson
jdonelson requested a review from a team as a code owner August 31, 2026 20:55
@jdonelson
jdonelson requested a review from leedqin August 31, 2026 20:55
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CNS-56

@def-

def- commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

QA LLM Review

1. MEDIUM -- New button's accessible name collides with the navbar "Create New" locator in the platform e2e test

console/e2e-tests/platform.spec.ts:104

The new header button is named "Create New App Password", and Playwright's getByRole matches name as a case-insensitive substring by default. On /access/app-passwords the locator getByRole("button", { name: "Create new" }) now resolves to both the navbar popover trigger ("Create New", console/src/layouts/NavBar/CreateObjectButton.tsx:82) and the new page button, so .click() raises a strict-mode violation and the surrounding toPass retries for 30s before failing the whole app-password creation flow.

Details

The spec navigates to /access, which redirects to /access/app-passwords (console/src/platform/AuthenticatedRoutes.tsx:137), and context.goto waits for [data-testid=page-layout], so the navbar and the new header button are both mounted before the click. CreateObjectButton is rendered unconditionally by NavBar (console/src/layouts/NavBar.tsx:237), so this is not a startup race that resolves itself: the retry loop just re-hits the ambiguity until the 30s budget runs out.

The spec already relies on this substring behaviour a few lines up, where the "App Password" popover entry is pinned with exact: true precisely because "App Passwords" would otherwise also match. The same fix applies here:

-      await page.getByRole("button", { name: "Create new" }).click();
+      await page.getByRole("button", { name: "Create New", exact: true }).click();

This spec runs on every PR in both console-e2e-test and console-e2e-test-prod, across the chromium and webkit projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants