diff --git a/e2e/team.spec.ts b/e2e/team.spec.ts index c6d3c11..cff54f8 100644 --- a/e2e/team.spec.ts +++ b/e2e/team.spec.ts @@ -16,7 +16,7 @@ async function verifyTeamMemberCard(card: Locator, name: string, title?: string) await expect(photo).toHaveAttribute('alt-text', `${name} photo`) } -test('shows the team', async ({ page }) => { +test('shows the team in English', async ({ page }) => { await page.goto('/#/team') const teamContainer = page.getByLabel('team-container') @@ -44,3 +44,32 @@ test('shows the team', async ({ page }) => { await expect(annLink).toHaveAttribute('href', 'https://annkilzer.net') await expect(annLink).toHaveAttribute('target', '_blank') }); + +test('shows the team in Japanese', async ({ page }) => { + await page.goto('/#/team') + + // switch locale to Japanese + const hamburger = page.getByLabel('drawer-toggle-button') + await hamburger.click() + const japanese = page.getByLabel('drawer').getByText('日本語') + await japanese.click() + + const teamContainer = page.getByLabel('team-container') + + // click off to close sidebar + await teamContainer.click({ force: true }); + + const heading = teamContainer.getByText('✨ リーダーシップ・チーム ✨') + await expect(heading).toBeVisible() + + const cards = await teamContainer.getByLabel('team-member-card').all() + expect(cards).toHaveLength(7) + + await verifyTeamMemberCard(cards[0], 'キルザー·杏', 'ディレクター') + await verifyTeamMemberCard(cards[1], 'Paty Cortez', '') + await verifyTeamMemberCard(cards[2], 'Maria Tenorio', '') + await verifyTeamMemberCard(cards[3], 'バジェニナ・ダリヤ', 'ML&データサイエンス・リード') + await verifyTeamMemberCard(cards[4], 'ブレサー クリザ', 'リード') + await verifyTeamMemberCard(cards[5], 'Anna Nakayama', '') + await verifyTeamMemberCard(cards[6], 'Aidan Fournier', '') +})