mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 17:35:05 +10:00
fix: clean up duplicate dialogs (#2686)
This commit is contained in:
@@ -296,7 +296,7 @@ test.describe('document editor', () => {
|
||||
await page.getByRole('button', { name: 'Duplicate' }).click();
|
||||
|
||||
// Assert toast appears.
|
||||
await expectToastTextToBeVisible(page, 'Envelope Duplicated');
|
||||
await expectToastTextToBeVisible(page, 'Document Duplicated');
|
||||
|
||||
// The page should have navigated to the new document's edit page.
|
||||
await expect(page).toHaveURL(/\/documents\/.*\/edit/);
|
||||
@@ -422,7 +422,7 @@ test.describe('template editor', () => {
|
||||
await page.getByRole('button', { name: 'Duplicate' }).click();
|
||||
|
||||
// Assert toast appears.
|
||||
await expectToastTextToBeVisible(page, 'Envelope Duplicated');
|
||||
await expectToastTextToBeVisible(page, 'Template Duplicated');
|
||||
|
||||
// The page should have navigated to the new template's edit page.
|
||||
await expect(page).toHaveURL(/\/templates\/.*\/edit/);
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user