Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions packages/web-shell/client/e2e/visuals/screenshots.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,16 +423,23 @@ for (const theme of THEMES) {
// Open: the three-mode popover (current / new branch / worktree). Assert
// an option is visible (not just the chip's aria-label) so a regression
// that fails to open the popover fails here, not only in the visually
// reviewed screenshot. The branch-name sub-state is intentionally not
// captured: its input autoFocuses, and the popover then dismisses on the
// idle frame captureScreenshot waits for — so it can't be shot stably
// through this pipeline (the functional web-shell.git-mode.spec.ts drives
// that path). The chip + open popover already show the new UI head-only.
// reviewed screenshot.
await chip.click();
await expect(
page.getByText('Current branch', { exact: true }),
).toBeVisible();
await captureScreenshot(page, `git-mode-popover-${theme}`);

// #7668 keeps this sub-state open; its input is the visual regression guard.
// Match by role — the label spans multiple elements, so getByText is ambiguous.
await page.getByRole('radio', { name: /New branch/ }).click();
const branchInput = page.locator('[data-testid="git-mode-branch-input"]');
await expect(branchInput).toBeVisible();
await branchInput.fill('feat/my-feature');
await expect(
page.locator('[data-testid="git-mode-confirm-branch"]'),
).toBeEnabled();
await captureScreenshot(page, `git-mode-branch-${theme}`);
});

test(`slash menu`, async ({ page }, testInfo) => {
Expand Down
Loading