Browse Source

Playwright: additional checks to add contact

Jose Olarte III 4 months ago
parent
commit
26f6eb66fe
  1. 2
      src/views/HomeView.vue
  2. 3
      test-playwright/40-add-contact.spec.ts

2
src/views/HomeView.vue

@ -103,7 +103,7 @@
</div> </div>
</div> </div>
<div v-else> <div v-else id="sectionRecordSomethingGiven">
<!-- activeDid && isRegistered --> <!-- activeDid && isRegistered -->
<!-- show the actions for recognizing a give --> <!-- show the actions for recognizing a give -->

3
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.getByPlaceholder('Name', { exact: true }).fill('Contact 00');
await page.locator('.dialog > .flex > button').first().click(); 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 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 gave to' }).nth(0)).toBeVisible();
await expect(page.locator('ul#listLatestActivity li').filter({ hasText: 'Contact 00 received' }).nth(0)).toBeVisible(); await expect(page.locator('ul#listLatestActivity li').filter({ hasText: 'Contact 00 received' }).nth(0)).toBeVisible();
}); });
Loading…
Cancel
Save