Playwright: additional checks to add contact

This commit is contained in:
Jose Olarte III
2024-07-30 19:13:18 +08:00
parent 2aead1b4b1
commit 8008504828
2 changed files with 3 additions and 2 deletions

View File

@@ -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();
});