Files
redefined-designs/frontend/tests/e2e/storefront.spec.ts
T
2026-08-13 22:35:38 +00:00

22 lines
810 B
TypeScript
Executable File

import { test, expect } from '@playwright/test';
test.describe('Storefront', () => {
test('loads and shows the site title', async ({ page }) => {
await page.goto('/');
await expect(page.getByText('Redefined Designs')).toBeVisible();
});
test('links to the privacy policy from the footer', async ({ page }) => {
await page.goto('/');
await page.getByRole('link', { name: 'Privacy Policy' }).click();
await expect(page).toHaveURL(/\/privacy/);
await expect(page.getByText('What we collect')).toBeVisible();
});
test('offers login and sign up when logged out', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('button', { name: 'Log in' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Sign up' })).toBeVisible();
});
});