Browse Source

add more specific check to avoid complaint about multiple matches

Trent Larson 2 months ago
parent
commit
270c9067fc
  1. 8
      README.md
  2. 2
      test-playwright/40-add-contact.spec.ts

8
README.md

@ -31,6 +31,14 @@ npm run serve
npm run lint npm run lint
``` ```
### Run all important tests
... including automated UI tests (see below for details)
```
npm run test-all
```
### Compile and minify for test & production ### Compile and minify for test & production
* If there are DB changes: before updating the test server, open browser(s) with current version to test DB migrations. * If there are DB changes: before updating the test server, open browser(s) with current version to test DB migrations.

2
test-playwright/40-add-contact.spec.ts

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

Loading…
Cancel
Save