import { test, expect } from '@playwright/test'; test.describe('My Weekly To Do List - Main Functionality', () => { test('should load the main page correctly', async ({ page }) => { // Navigate to the main page await page.goto('/'); // Check that the page title is correct await expect(page).toHaveTitle(/My Weekly To Do List/); // Check that main elements are present await expect(page.getByText('My Weekly To Do List')).toBeVisible(); await expect(page.getByText('Weekly View')).toBeVisible(); }); test('should have task creation functionality', async ({ page }) => { await page.goto('/'); // Check that we can find the task creation input const taskInput = page.locator('[data-testid="task-input"]'); await expect(taskInput).toBeVisible(); // Try to create a new task await taskInput.fill('Test task'); await page.keyboard.press('Enter'); // Check that the task was added await expect(page.getByText('Test task')).toBeVisible(); }); });