diff --git a/.changelog/1852.trivial.md b/.changelog/1852.trivial.md new file mode 100644 index 0000000000..2da60a6e8e --- /dev/null +++ b/.changelog/1852.trivial.md @@ -0,0 +1 @@ +Fix playwright tests finding duplicate elements in closing modals diff --git a/playwright/tests/toolbar.spec.ts b/playwright/tests/toolbar.spec.ts index e733c0c23b..bdccc68df7 100644 --- a/playwright/tests/toolbar.spec.ts +++ b/playwright/tests/toolbar.spec.ts @@ -46,6 +46,7 @@ test.describe('Profile tab', () => { await expect(page.getByText('Password updated.')).toBeVisible() await page.getByTestId('close-settings-modal').click() + await expect(page.getByTestId('close-settings-modal')).not.toBeVisible() await page.getByRole('button', { name: /Lock profile/ }).click() await page.getByPlaceholder('Enter your password here').fill(tempPassword) await page.getByRole('button', { name: /Unlock/ }).click() @@ -63,6 +64,7 @@ test.describe('Profile tab', () => { // validate default password await page.getByTestId('close-settings-modal').click() + await expect(page.getByTestId('close-settings-modal')).not.toBeVisible() await page.getByRole('button', { name: /Lock profile/ }).click() await page.getByPlaceholder('Enter your password here').fill(password) await page.getByRole('button', { name: /Unlock/ }).click()