2026-07-16 06:19:58 -04:00
|
|
|
import { test, expect } from '@playwright/test';
|
|
|
|
|
import { login } from './helpers/auth';
|
|
|
|
|
|
2026-07-29 08:03:28 -04:00
|
|
|
test.describe('Projects', () => {
|
2026-07-16 06:19:58 -04:00
|
|
|
test.beforeEach(async ({ page }) => {
|
|
|
|
|
await login(page);
|
|
|
|
|
await page.goto('/projects');
|
|
|
|
|
await expect(page.getByRole('heading', { name: /projects/i })).toBeVisible();
|
|
|
|
|
});
|
|
|
|
|
|
2026-07-29 08:03:28 -04:00
|
|
|
test('should display projects page with grid layout', async ({ page }) => {
|
|
|
|
|
await expect(page.getByRole('button', { name: /new project/i })).toBeVisible();
|
2026-07-16 06:19:58 -04:00
|
|
|
});
|
|
|
|
|
|
2026-07-29 08:03:28 -04:00
|
|
|
test('should open new project dialog', async ({ page }) => {
|
|
|
|
|
await page.getByRole('button', { name: /new project/i }).click();
|
|
|
|
|
// Dialog should appear
|
|
|
|
|
await page.waitForTimeout(500);
|
2026-07-16 06:19:58 -04:00
|
|
|
});
|
|
|
|
|
|
2026-07-29 08:03:28 -04:00
|
|
|
test('should show project cards in grid', async ({ page }) => {
|
|
|
|
|
// The grid container should exist
|
|
|
|
|
const grid = page.locator('.grid, [class*="grid"]').first();
|
|
|
|
|
await expect(grid).toBeVisible();
|
2026-07-16 06:19:58 -04:00
|
|
|
});
|
|
|
|
|
});
|