mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user