Files
gymflow/tests/idle-state-start-quick-log.spec.ts

24 lines
928 B
TypeScript

// spec: specs/gymflow-test-plan.md
// seed: tests/workout-tracking.spec.ts
import { test, expect } from '@playwright/test';
test.describe('III. Workout Tracking', () => {
test('B. Idle State - Start Quick Log', async ({ page }) => {
// 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('admin1234');
await page.getByRole('button', { name: 'Login' }).click();
// 2. Ensure the tracker is in the idle state. (This is the default view after login)
// 3. Click 'Quick Log' button.
await page.getByRole('button', { name: 'Quick Log' }).click();
// Expected Results:
// - The application transitions to 'Sporadic Logging' view.
await expect(page.getByRole('heading', { name: 'Quick Log' })).toBeVisible();
});
});