From 270c9067fc91b94ce22bfd3909bf3b5f7827a127 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 22 Sep 2024 13:27:21 -0600 Subject: [PATCH] add more specific check to avoid complaint about multiple matches --- README.md | 8 ++++++++ test-playwright/40-add-contact.spec.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f4c17d..6fda93c 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,14 @@ npm run serve 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 * If there are DB changes: before updating the test server, open browser(s) with current version to test DB migrations. diff --git a/test-playwright/40-add-contact.spec.ts b/test-playwright/40-add-contact.spec.ts index efbd0c7..8e9c24b 100644 --- a/test-playwright/40-add-contact.spec.ts +++ b/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.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