From 214832b6512310ac87ce2c9f7bf71f630bfb6880 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 17 Jul 2025 15:21:46 +0800 Subject: [PATCH] Fix: Copy to Clipboard button targeting --- test-playwright/00-noid-tests.spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test-playwright/00-noid-tests.spec.ts b/test-playwright/00-noid-tests.spec.ts index afb66068..9c27273b 100644 --- a/test-playwright/00-noid-tests.spec.ts +++ b/test-playwright/00-noid-tests.spec.ts @@ -156,12 +156,11 @@ test('Check setting name & sharing info', async ({ page }) => { await page.locator('button:has-text("Save")').click(); await expect(page.getByText('share some other way')).toBeVisible(); await page.getByRole('button', { name: /share some other way/ }).click(); - await expect(page.getByRole('button', { name: 'copy to clipboard' })).toBeVisible(); - await page.getByRole('button', { name: 'copy to clipboard' }).click(); + await expect(page.getByRole('button', { name: 'Copy contact information to' })).toBeVisible(); + await page.getByRole('button', { name: 'Copy contact information to' }).click(); await expect(page.getByText('contact info was copied')).toBeVisible(); - // dismiss alert and wait for it to go away - await page.locator('div[role="alert"] button > svg.fa-xmark').click(); - await expect(page.getByText('contact info was copied')).toBeHidden(); + // wait for alert to go away + await expect(page.getByText('contact info was copied')).toBeHidden({ timeout: 10000 }); // check that they're on the Contacts screen await expect(page.getByText('your contacts')).toBeVisible(); });