- bcrypt password hashing in auth (register, login, change-password) - Login/register pages with password fields - Profile update + OAuth placeholder endpoints - Playwright test suite: auth, pages, API (3 test files) - PostHog Docker analytics on :8010 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Auth Flow', () => {
|
|
const email = `test-${Date.now()}@test.cz`;
|
|
|
|
test('register page loads', async ({ page }) => {
|
|
await page.goto('/register');
|
|
await expect(page).toHaveTitle(/Task Team/);
|
|
});
|
|
|
|
test('login page loads', async ({ page }) => {
|
|
await page.goto('/login');
|
|
await expect(page.locator('input[type="email"]')).toBeVisible();
|
|
});
|
|
|
|
test('register new user', async ({ page }) => {
|
|
await page.goto('/register');
|
|
// Name is the first text input (autoFocus), email is type=email
|
|
await page.locator('input[type="text"]').first().fill('Test User');
|
|
await page.locator('input[type="email"]').fill(email);
|
|
await page.locator('button[type="submit"]').click();
|
|
await page.waitForTimeout(2000);
|
|
// Should redirect to tasks or show success
|
|
});
|
|
|
|
test('login existing user', async ({ page }) => {
|
|
await page.goto('/login');
|
|
await page.fill('input[type="email"]', email);
|
|
await page.locator('button[type="submit"]').click();
|
|
await page.waitForTimeout(2000);
|
|
});
|
|
});
|