Files
gymflow/tests/adaptive-gui-desktop-navigation.spec.ts
2025-12-03 18:01:36 +02:00

31 lines
1.6 KiB
TypeScript

// spec: specs/gymflow-test-plan.md
// seed: tests/ui-ux.spec.ts
import { test, expect } from '@playwright/test';
test.describe('User Interface & Experience', () => {
test.fixme('Adaptive GUI - Desktop Navigation (Width >= 768px)', async ({ page }) => {
// This test is currently skipped because of a persistent login issue.
// The test user credentials appear to be invalid, preventing the test from proceeding.
// This needs to be investigated and fixed before the test can be re-enabled.
// 1. Log in as a regular user.
await page.goto('http://192.168.50.234:3000/');
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('test@e2e.com');
await page.locator('input[type="password"]').fill('e2e');
await page.getByRole('button', { name: 'Login' }).click();
// 2. Resize the browser window to a desktop width (e.g., 1280px).
await page.setViewportSize({ width: 1280, height: 720 });
// 3. Verify the vertical navigation rail is visible and functional.
await expect(page.getByRole('link', { name: 'Tracker' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Plans' })).toBeVisible();
await expect(page.getByRole('link', { name: 'History' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Stats' })).toBeVisible();
await expect(page.getByRole('link', { name: 'AI Coach' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Profile' })).toBeVisible();
// 4. Verify the mobile bottom navigation bar is hidden.
await expect(page.getByRole('navigation', { name: 'Bottom navigation bar' })).toBeHidden();
});
});