initial commit

This commit is contained in:
Harivansh Rathi 2024-11-25 19:28:40 -05:00
commit 9963e01acc
158 changed files with 48198 additions and 0 deletions

26
tests/e2e/I18n.e2e.ts Normal file
View file

@ -0,0 +1,26 @@
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.getByText('The perfect SaaS template to build')).toBeVisible();
await page.getByRole('button', { name: 'lang-switcher' }).click();
await page.getByText('Français').click();
await expect(page.getByText('Le parfait SaaS template pour construire')).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();
});
});
});