Skip to content

Commit

Permalink
e2e test passing
Browse files Browse the repository at this point in the history
  • Loading branch information
ann-kilzer committed Jul 6, 2024
1 parent 38068e7 commit 15580b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions e2e/team.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { test, expect, Locator } from '@playwright/test';
*
* @param card The Locator for the TeamMember Card
* @param name The name to find
* @param title The title to find
* @param title The title to find, if defined
*/
async function verifyTeamMemberCard(card: Locator, name: string, title: string) {
async function verifyTeamMemberCard(card: Locator, name: string, title?: string) {
await expect(card.getByText(name)).toBeVisible()
await expect(card.getByText(title)).toBeVisible()
if (title) {
await expect(card.getByText(title)).toBeVisible()
}
const photo = card.getByRole('img').first()
await expect(photo).toBeVisible()
await expect(photo).toHaveAttribute('alt-text', `${name} photo`)
Expand All @@ -31,7 +33,7 @@ test('shows the team', async ({ page }) => {
await verifyTeamMemberCard(cards[3], 'Daria Vazhenina', 'ML & Data Science Lead')
await verifyTeamMemberCard(cards[4], 'Krizza Bullecer', 'Lead')
await verifyTeamMemberCard(cards[5], 'Anna Nakayama', '')
await verifyTeamMemberCard(cards[5], 'Aidan Fournier', '')
await verifyTeamMemberCard(cards[6], 'Aidan Fournier', '')

// verify link
const links = await page.getByLabel('link-wrapper').all()
Expand Down

0 comments on commit 15580b6

Please sign in to comment.