- Add Google Tasks integration and Apple Reminders support - Add task import/export with list management APIs - Add goal API for weekly goals - Add German holidays library - Add ImportListModal component - Enhance WeeklyView with major UI improvements - Enhance CalendarSettings with new connection options - Add external task fields to database schema - Add Playwright test suites for auth and tasks - Add iCloud reminders Python scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Authentication Flow', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto('/');
|
|
});
|
|
|
|
test('should show login page by default', async ({ page }) => {
|
|
// Check if redirected to login if not authenticated
|
|
// The app might redirect to /api/auth/signin or a custom /login
|
|
await expect(page).toHaveURL(/.*auth\/signin|login/);
|
|
await expect(page.locator('button', { hasText: /Sign in|Login/i })).toBeVisible();
|
|
});
|
|
|
|
test('should allow user to navigate to registration (if exists)', async ({ page }) => {
|
|
const signUpLink = page.locator('a', { hasText: /Sign up|Register/i });
|
|
if (await signUpLink.isVisible()) {
|
|
await signUpLink.click();
|
|
await expect(page).toHaveURL(/.*signup|register/);
|
|
}
|
|
});
|
|
|
|
test('should show error on invalid credentials', async ({ page }) => {
|
|
await page.fill('input[name="email"]', 'wrong@example.com');
|
|
await page.fill('input[name="password"]', 'wrongpassword');
|
|
await page.click('button[type="submit"]');
|
|
|
|
// Adjust selector based on actual error message implementation
|
|
await expect(page.locator('text=/Invalid|Error|failed/i')).toBeVisible();
|
|
});
|
|
});
|