From 4624afac20799cfe8fd082de6fd10428a2e9537a Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Sat, 17 Feb 2024 00:15:44 +0100 Subject: [PATCH] Fix playwright tests finding duplicate elements in closing modals Somewhat related to 66cde90085a3b585034077ccaa710c8ca55843b5 --- .changelog/1852.trivial.md | 1 + playwright/tests/toolbar.spec.ts | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 .changelog/1852.trivial.md 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()