Files
gymflow/tests/adaptive-gui-mobile-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 - Mobile 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('admin@gymflow.ai');
await page.locator('input[type="password"]').fill('admin');
await page.getByRole('button', { name: 'Login' }).click();
// 2. Resize the browser window to a mobile width (e.g., 375px).
await page.setViewportSize({ width: 375, height: 667 });
// 3. Verify the bottom navigation bar is visible and functional.
await expect(page.getByRole('button', { name: 'Tracker' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Plans' })).toBeVisible();
await expect(page.getByRole('button', { name: 'History' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Stats' })).toBeVisible();
await expect(page.getByRole('button', { name: 'AI Coach' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Profile' })).toBeVisible();
// 4. Verify the desktop navigation rail is hidden.
await expect(page.getByRole('navigation', { name: 'Main' })).toBeHidden();
});
});