From 26f6eb66fea43f69c0425268fc87062b2933afb1 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Tue, 30 Jul 2024 19:13:18 +0800 Subject: [PATCH] Playwright: additional checks to add contact --- src/views/HomeView.vue | 2 +- test-playwright/40-add-contact.spec.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 0e0d13b..7e83081 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -103,7 +103,7 @@ -
+
diff --git a/test-playwright/40-add-contact.spec.ts b/test-playwright/40-add-contact.spec.ts index 2bb52d6..ede6260 100644 --- a/test-playwright/40-add-contact.spec.ts +++ b/test-playwright/40-add-contact.spec.ts @@ -30,8 +30,9 @@ test('Add contact', async ({ page }) => { await page.getByPlaceholder('Name', { exact: true }).fill('Contact 00'); await page.locator('.dialog > .flex > button').first().click(); - // Confirm that home feed shows contact + // Confirm that home shows contact in "Record Something…" and "Latest Activity" await page.goto('./'); + await expect(page.locator('#sectionRecordSomethingGiven ul li').filter({ hasText: 'Contact 00' }).nth(0)).toBeVisible(); await expect(page.locator('ul#listLatestActivity li').filter({ hasText: 'Contact 00 gave to' }).nth(0)).toBeVisible(); await expect(page.locator('ul#listLatestActivity li').filter({ hasText: 'Contact 00 received' }).nth(0)).toBeVisible(); }); \ No newline at end of file