Browse Source

Fix: Copy to Clipboard button targeting

web-serve-fix
Jose Olarte III 1 week ago
parent
commit
5c5af5b5cb
  1. 9
      test-playwright/00-noid-tests.spec.ts

9
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();
});

Loading…
Cancel
Save