fix: clean up duplicate dialogs (#2686)

This commit is contained in:
David Nguyen
2026-04-09 14:37:49 +10:00
committed by GitHub
parent 283334921b
commit 6d7bd212bf
12 changed files with 159 additions and 612 deletions
@@ -117,7 +117,13 @@ test('[TEMPLATES]: duplicate template', async ({ page }) => {
await expect(page.getByRole('menuitem', { name: 'Duplicate' })).toBeVisible();
await page.getByRole('menuitem', { name: 'Duplicate' }).click();
await page.getByRole('button', { name: 'Duplicate' }).click();
await expect(page.getByText('Template duplicated').first()).toBeVisible();
await expect(page.getByText('Template Duplicated').first()).toBeVisible();
// The dialog should navigate to the new template's edit page.
await page.waitForURL(/\/templates\/.*\/edit/);
// Navigate back to the templates list and verify the count is now 2.
await page.goto(`/t/${team.url}/templates`);
await expect(page.getByTestId('data-table-count')).toContainText('Showing 2 results');
});