add more specific check to avoid complaint about multiple matches

This commit is contained in:
2024-09-22 13:27:21 -06:00
parent b149e623b2
commit cd9f6b448b
2 changed files with 9 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
await page.goto('./contacts');
await page.getByPlaceholder('URL or DID, Name, Public Key').fill('did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F, User #000');
await page.locator('button > svg.fa-plus').click();
await expect(page.locator('div[role="alert"]')).toBeVisible();
await expect(page.locator('div[role="alert"] span:has-text("Contact Added")')).toBeVisible();
await page.locator('div[role="alert"] button:has-text("No")').click(); // don't register
await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss info alert
await expect(page.locator('div[role="alert"] button > svg.fa-xmark')).toBeHidden(); // ensure alert is gone