Add backend unit/integration tests, Playwright e2e tests, README, cookie Secure fix
SonarQube Analysis / sonarqube (push) Successful in 4m20s
SonarQube Analysis / sonarqube (push) Successful in 4m20s
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user