My-Weekly-ToDo-List/tests/login-debug-simplified.spec.ts
mARTin c82572935c feat: dark mode color adjustment, multi-source quotes, UI text wrapping, and versioning rules
- Add dark mode color adjustment helper for category colors
- Support multiple motivational quote source URLs
- Fix text wrapping for tasks/events to prevent horizontal overflow
- Improve someday list item layout for long text
- Add CLAUDE.md with semantic versioning and git workflow rules
- Update test/doc URLs and planning docs

v1.1.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:33:25 +01:00

60 lines
2.3 KiB
TypeScript

import { test, expect } from '@playwright/test';
test.describe('Login Page Debug - Simplified', () => {
test('should load login page successfully', async ({ page }) => {
await page.goto('http://localhost:3001/auth/login');
// Basic page load verification
await expect(page).toHaveURL(/login/);
await expect(page).toHaveTitle(/Weekly To Do List/);
// Check for key elements that should be present
await expect(page.locator('h1')).toContainText('Weekly To Do List');
await expect(page.locator('p')).toContainText('Sign in to your account');
// Check for form elements
await expect(page.locator('input[name="email"]')).toBeVisible();
await expect(page.locator('input[name="password"]')).toBeVisible();
await expect(page.locator('button[type="submit"]')).toBeVisible();
// Check for navigation links
await expect(page.getByRole('link', { name: 'Don\'t have an account?' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Forgot your password?' })).toBeVisible();
});
test('should have Tailwind CSS classes in structure', async ({ page }) => {
await page.goto('http://localhost:3001/auth/login');
// Check main container classes
const container = page.locator('div.min-h-screen.bg-gray-50');
await expect(container).toBeVisible();
// Check the form container
const formContainer = page.locator('div.bg-white.rounded-xl.shadow-lg.p-8');
await expect(formContainer).toBeVisible();
// Check for basic Tailwind classes that should be present
const bodyClass = await page.evaluate(() => document.body.className);
expect(bodyClass).toContain('min-h-screen');
expect(bodyClass).toContain('bg-gray-50');
});
test('should have functional form elements', async ({ page }) => {
await page.goto('http://localhost:3001/auth/login');
// Test that the form exists
const form = page.locator('form');
await expect(form).toBeVisible();
// Test that we can interact with inputs
const emailInput = page.locator('input[name="email"]');
const passwordInput = page.locator('input[name="password"]');
await expect(emailInput).toBeVisible();
await expect(passwordInput).toBeVisible();
// Test that submit button exists
const submitButton = page.locator('button[type="submit"]');
await expect(submitButton).toBeVisible();
});
});