mirror of
https://github.com/johndoe6345789/postgres.git
synced 2026-04-24 13:55:00 +00:00
30 lines
1005 B
TypeScript
30 lines
1005 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
test.describe('I18n', () => {
|
|
test.describe('Language Switching', () => {
|
|
test('should switch language from English to French using dropdown and verify text on the homepage', async ({ page }) => {
|
|
await page.goto('/');
|
|
|
|
await expect(
|
|
page.getByRole('heading', { name: 'Boilerplate Code for Your Next.js Project with Tailwind CSS' }),
|
|
).toBeVisible();
|
|
|
|
await page.getByLabel('lang-switcher').selectOption('fr');
|
|
|
|
await expect(
|
|
page.getByRole('heading', { name: 'Code de démarrage pour Next.js avec Tailwind CSS' }),
|
|
).toBeVisible();
|
|
});
|
|
|
|
test('should switch language from English to French using URL and verify text on the sign-in page', async ({ page }) => {
|
|
await page.goto('/sign-in');
|
|
|
|
await expect(page.getByText('Email address')).toBeVisible();
|
|
|
|
await page.goto('/fr/sign-in');
|
|
|
|
await expect(page.getByText('Adresse e-mail')).toBeVisible();
|
|
});
|
|
});
|
|
});
|