refactor(frontend): migrate Stack/Fleet confirms and Git source dialog (#951)

* refactor(frontend): migrate Stack/Fleet confirms and Git source dialog

- LocalUpdateConfirmDialog -> ConfirmModal with kicker LOCAL · UPDATE
- GitSourcePanel form -> Modal with kicker {STACK} · GIT SOURCE; the
  custom three-button footer (Remove / Pull now / Save) stays as-is
  since ModalFooter's two-slot pattern doesn't fit a left-aligned
  destructive action; ModalHeader provides the canonical chrome
- GitSourcePanel remove confirm -> destructive ConfirmModal with
  kicker {STACK} · GIT · DISCONNECT

* test(e2e): scope git-source dialog assertion to the heading

The migration adds a kicker rune "<STACK> · GIT SOURCE" inside the
dialog. The previous locator getByText('Git Source', { exact: false })
matched both the kicker (uppercase, mono) and the italic-serif title,
producing a strict-mode violation. Use getByRole('heading') to target
the title specifically.
This commit is contained in:
Anso
2026-05-06 20:19:07 -04:00
committed by GitHub
parent fe06838bf7
commit 9ab7819b24
3 changed files with 48 additions and 64 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ async function openGitSourcePanel(page: Page) {
const gitBtn = page.getByRole('button', { name: /Git Source/i });
await expect(gitBtn).toBeVisible({ timeout: 10_000 });
await gitBtn.click();
await expect(page.getByRole('dialog').getByText('Git Source', { exact: false })).toBeVisible({ timeout: 5_000 });
// Match the title heading specifically; the modal also has a mono kicker
// ("<STACK> · GIT SOURCE") that would satisfy a plain getByText match.
await expect(page.getByRole('dialog').getByRole('heading', { name: /git source/i })).toBeVisible({ timeout: 5_000 });
}
test.describe('Git Sources', () => {