Testf from IP to localhost. Fixed some tests.
This commit is contained in:
85
playwright-report/index.html
Normal file
85
playwright-report/index.html
Normal file
File diff suppressed because one or more lines are too long
21
playwright.config.ts
Normal file
21
playwright.config.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { defineConfig, devices } from '@playwright/test';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
testDir: './tests',
|
||||||
|
fullyParallel: true,
|
||||||
|
forbidOnly: !!process.env.CI,
|
||||||
|
retries: process.env.CI ? 2 : 0,
|
||||||
|
workers: process.env.CI ? 1 : undefined,
|
||||||
|
reporter: 'html',
|
||||||
|
use: {
|
||||||
|
baseURL: 'http://localhost:3000',
|
||||||
|
trace: 'on-first-retry',
|
||||||
|
},
|
||||||
|
projects: [
|
||||||
|
{
|
||||||
|
name: 'chromium',
|
||||||
|
use: { ...devices['Desktop Chrome'] },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
});
|
||||||
Binary file not shown.
3500
test-output.json
Normal file
3500
test-output.json
Normal file
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Delete Logged Set', async ({ page }) => {
|
test('C. Active Session - Delete Logged Set', async ({ page }) => {
|
||||||
// 1. Start a 'Free Workout' session.
|
// 1. Start a 'Free Workout' session.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Finish Session', async ({ page }) => {
|
test('C. Active Session - Finish Session', async ({ page }) => {
|
||||||
// 1. Start a 'Free Workout' session.
|
// 1. Start a 'Free Workout' session.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Log Bodyweight Set', async ({ page }) => {
|
test('C. Active Session - Log Bodyweight Set', async ({ page }) => {
|
||||||
// 1. Start a 'Free Workout' session.
|
// 1. Start a 'Free Workout' session.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Log Cardio Set', async ({ page }) => {
|
test('C. Active Session - Log Cardio Set', async ({ page }) => {
|
||||||
// 1. Start a 'Free Workout' session.
|
// 1. Start a 'Free Workout' session.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Log Strength Set', async ({ page }) => {
|
test('C. Active Session - Log Strength Set', async ({ page }) => {
|
||||||
// 1. Start a 'Free Workout' session (ensure body weight is set).
|
// 1. Start a 'Free Workout' session (ensure body weight is set).
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Plan Progression and Jump to Step', async ({ page }) => {
|
test('C. Active Session - Plan Progression and Jump to Step', async ({ page }) => {
|
||||||
// 1. Start a session from a workout plan with multiple steps.
|
// 1. Start a session from a workout plan with multiple steps.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('C. Active Session - Quit Session Without Saving', async ({ page }) => {
|
test('C. Active Session - Quit Session Without Saving', async ({ page }) => {
|
||||||
// 1. Start a 'Free Workout' session.
|
// 1. Start a 'Free Workout' session.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('C. Admin Panel - Block/Unblock User', async ({ page }) => {
|
test('C. Admin Panel - Block/Unblock User', async ({ page }) => {
|
||||||
// 1. Log in as an 'ADMIN' user.
|
// 1. Log in as an 'ADMIN' user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('C. Admin Panel - Create New User', async ({ page }) => {
|
test('C. Admin Panel - Create New User', async ({ page }) => {
|
||||||
// 1. Log in as an 'ADMIN' user.
|
// 1. Log in as an 'ADMIN' user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('C. Admin Panel - Delete User', async ({ page }) => {
|
test('C. Admin Panel - Delete User', async ({ page }) => {
|
||||||
// 1. Log in as an 'ADMIN' user.
|
// 1. Log in as an 'ADMIN' user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('C. Admin Panel - View User List', async ({ page }) => {
|
test('C. Admin Panel - View User List', async ({ page }) => {
|
||||||
// 1. Log in as an 'ADMIN' user.
|
// 1. Log in as an 'ADMIN' user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('B. AI Coach - Send a Message', async ({ page }) => {
|
test('B. AI Coach - Send a Message', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('B. Exercise Library - Archive/Unarchive Exercise', async ({ page }) => {
|
test('B. Exercise Library - Archive/Unarchive Exercise', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('B. Exercise Library - Create Custom Exercise (Bodyweight with %)', async ({ page }) => {
|
test('B. Exercise Library - Create Custom Exercise (Bodyweight with %)', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('B. Exercise Library - Create Custom Exercise (Strength)', async ({ page }) => {
|
test('B. Exercise Library - Create Custom Exercise (Strength)', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('B. Exercise Library - Edit Exercise Name', async ({ page }) => {
|
test('B. Exercise Library - Edit Exercise Name', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('B. Exercise Library - Filter Exercises by Name', async ({ page }) => {
|
test('B. Exercise Library - Filter Exercises by Name', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('B. Idle State - Body Weight Defaults from Profile', async ({ page }) => {
|
test('B. Idle State - Body Weight Defaults from Profile', async ({ page }) => {
|
||||||
// 1. Log in as a regular user with a weight set in their profile.
|
// 1. Log in as a regular user with a weight set in their profile.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('B. Idle State - Start Free Workout', async ({ page }) => {
|
test('B. Idle State - Start Free Workout', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('B. Idle State - Start Quick Log', async ({ page }) => {
|
test('B. Idle State - Start Quick Log', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('A. Login - First-Time Password Change (Password too short)', async ({ page }) => {
|
test('A. Login - First-Time Password Change (Password too short)', async ({ page }) => {
|
||||||
// 1. Navigate to the login page.
|
// 1. Navigate to the login page.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
|
|
||||||
// Log in as admin to create a new user for testing first-time login
|
// Log in as admin to create a new user for testing first-time login
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('A. Login - First-Time Password Change', async ({ page }) => {
|
test('A. Login - First-Time Password Change', async ({ page }) => {
|
||||||
// 1. Navigate to the login page.
|
// 1. Navigate to the login page.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
|
|
||||||
// Log in as admin to create a new user for testing first-time login
|
// Log in as admin to create a new user for testing first-time login
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
@@ -40,7 +40,8 @@ test.describe('I. Core & Authentication', () => {
|
|||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - New password is set successfully.
|
// - New password is set successfully.
|
||||||
// - User is logged into the application.
|
// - User is logged into the application.
|
||||||
await expect(page).toHaveURL('http://192.168.50.234:3000/#/tracker');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await expect(page.getByRole('button', { name: 'Tracker' })).toBeVisible();
|
||||||
// - No error messages are displayed.
|
// - No error messages are displayed.
|
||||||
await expect(page.locator('text=Invalid credentials')).not.toBeVisible();
|
await expect(page.locator('text=Invalid credentials')).not.toBeVisible();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('A. Login - Invalid Credentials', async ({ page }) => {
|
test('A. Login - Invalid Credentials', async ({ page }) => {
|
||||||
// 1. Navigate to the login page.
|
// 1. Navigate to the login page.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
|
|
||||||
// 2. Enter an invalid email or password.
|
// 2. Enter an invalid email or password.
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('invalid@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('invalid@gymflow.ai');
|
||||||
@@ -19,6 +19,6 @@ test.describe('I. Core & Authentication', () => {
|
|||||||
// - An error message 'Invalid credentials' or similar is displayed.
|
// - An error message 'Invalid credentials' or similar is displayed.
|
||||||
await expect(page.locator('text=Invalid credentials')).toBeVisible();
|
await expect(page.locator('text=Invalid credentials')).toBeVisible();
|
||||||
// - User remains on the login page.
|
// - User remains on the login page.
|
||||||
await expect(page).toHaveURL('http://192.168.50.234:3000/#/login');
|
await expect(page).toHaveURL('http://localhost:3000/');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('A. Login - Language Selection (English)', async ({ page }) => {
|
test('A. Login - Language Selection (English)', async ({ page }) => {
|
||||||
// 1. Navigate to the login page.
|
// 1. Navigate to the login page.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
|
|
||||||
// 2. Select 'English' from the language dropdown.
|
// 2. Select 'English' from the language dropdown.
|
||||||
// The default language is English, so we just need to verify the text elements.
|
// The default language is English, so we just need to verify the text elements.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('A. Login - Language Selection (Russian)', async ({ page }) => {
|
test('A. Login - Language Selection (Russian)', async ({ page }) => {
|
||||||
// 1. Navigate to the login page.
|
// 1. Navigate to the login page.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
|
|
||||||
// 2. Select 'Русский' from the language dropdown.
|
// 2. Select 'Русский' from the language dropdown.
|
||||||
await page.getByRole('combobox').selectOption(['Русский']);
|
await page.getByRole('combobox').selectOption(['Русский']);
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { test, expect } from '@playwright/test';
|
|||||||
|
|
||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('A. Login - Successful Authentication', async ({ page }) => {
|
test('A. Login - Successful Authentication', async ({ page }) => {
|
||||||
// 1. Navigate to the login page (http://192.168.50.234:3000/).
|
// 1. Navigate to the login page (http://localhost:3000/).
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
|
|
||||||
// 2. Enter a valid email in the email field.
|
// 2. Enter a valid email in the email field.
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
@@ -17,9 +17,13 @@ test.describe('I. Core & Authentication', () => {
|
|||||||
// 4. Click the 'Login' button.
|
// 4. Click the 'Login' button.
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|
||||||
|
// Wait for navigation to complete
|
||||||
|
await page.waitForLoadState('networkidle');
|
||||||
|
|
||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - User is redirected to the main application dashboard (e.g., Tracker view).
|
// - User is redirected to the main application dashboard (e.g., Tracker view).
|
||||||
await expect(page).toHaveURL('http://192.168.50.234:3000/#/tracker');
|
// - We verify this by checking for the presence of the navigation bar with 'Tracker' button.
|
||||||
|
await expect(page.getByRole('button', { name: 'Tracker' })).toBeVisible();
|
||||||
// - No error messages are displayed.
|
// - No error messages are displayed.
|
||||||
await expect(page.locator('text=Invalid credentials')).not.toBeVisible();
|
await expect(page.locator('text=Invalid credentials')).not.toBeVisible();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('B. Navigation - Desktop Navigation Rail', async ({ page }) => {
|
test('B. Navigation - Desktop Navigation Rail', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('I. Core & Authentication', () => {
|
test.describe('I. Core & Authentication', () => {
|
||||||
test('B. Navigation - Mobile Bottom Navigation Bar', async ({ page }) => {
|
test('B. Navigation - Mobile Bottom Navigation Bar', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('B. Performance Statistics - View Body Weight Chart', async ({ page }) => {
|
test('B. Performance Statistics - View Body Weight Chart', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('B. Performance Statistics - View Set Count Chart', async ({ page }) => {
|
test('B. Performance Statistics - View Set Count Chart', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('B. Performance Statistics - View Volume Chart', async ({ page }) => {
|
test('B. Performance Statistics - View Volume Chart', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('A. Session History - Delete Sporadic Set', async ({ page }) => {
|
test('A. Session History - Delete Sporadic Set', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('A. Session History - Edit Past Session Details', async ({ page }) => {
|
test('A. Session History - Edit Past Session Details', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('A. Session History - View Detailed Session', async ({ page }) => {
|
test('A. Session History - View Detailed Session', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('IV. Data & Progress', () => {
|
test.describe('IV. Data & Progress', () => {
|
||||||
test('A. Session History - View Past Sessions', async ({ page }) => {
|
test('A. Session History - View Past Sessions', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('D. Sporadic Logging - Exercise Search and Clear', async ({ page }) => {
|
test('D. Sporadic Logging - Exercise Search and Clear', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('III. Workout Tracking', () => {
|
test.describe('III. Workout Tracking', () => {
|
||||||
test('D. Sporadic Logging - Log Strength Sporadic Set', async ({ page }) => {
|
test('D. Sporadic Logging - Log Strength Sporadic Set', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('A. User Profile - Change Password (Too Short)', async ({ page }) => {
|
test('A. User Profile - Change Password (Too Short)', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('A. User Profile - Change Password', async ({ page }) => {
|
test('A. User Profile - Change Password', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('A. User Profile - Dedicated Daily Weight Logging', async ({ page }) => {
|
test('A. User Profile - Dedicated Daily Weight Logging', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('A. User Profile - Delete Own Account', async ({ page }) => {
|
test('A. User Profile - Delete Own Account', async ({ page }) => {
|
||||||
// Prerequisite: Create a regular user for this test.
|
// Prerequisite: Create a regular user for this test.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
@@ -38,6 +38,7 @@ test.describe('V. User & System Management', () => {
|
|||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - User account is deleted.
|
// - User account is deleted.
|
||||||
// - User is logged out and redirected to the login page.
|
// - User is logged out and redirected to the login page.
|
||||||
await expect(page).toHaveURL('http://192.168.50.234:3000/#/login');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await expect(page.getByRole('button', { name: 'Login' })).toBeVisible();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('A. User Profile - Language Preference Change', async ({ page }) => {
|
test('A. User Profile - Language Preference Change', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('V. User & System Management', () => {
|
test.describe('V. User & System Management', () => {
|
||||||
test('A. User Profile - Update Personal Information', async ({ page }) => {
|
test('A. User Profile - Update Personal Information', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('A. Workout Plans - Create New Plan', async ({ page }) => {
|
test('A. Workout Plans - Create New Plan', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('A. Workout Plans - Delete Plan', async ({ page }) => {
|
test('A. Workout Plans - Delete Plan', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('A. Workout Plans - Edit Existing Plan', async ({ page }) => {
|
test('A. Workout Plans - Edit Existing Plan', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('A. Workout Plans - Reorder Exercises within a Plan', async ({ page }) => {
|
test('A. Workout Plans - Reorder Exercises within a Plan', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
test.describe('II. Workout Management', () => {
|
test.describe('II. Workout Management', () => {
|
||||||
test('A. Workout Plans - Start Session from Plan', async ({ page }) => {
|
test('A. Workout Plans - Start Session from Plan', async ({ page }) => {
|
||||||
// 1. Log in as a regular user.
|
// 1. Log in as a regular user.
|
||||||
await page.goto('http://192.168.50.234:3000/');
|
await page.goto('http://localhost:3000/');
|
||||||
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
await page.getByRole('textbox', { name: 'user@gymflow.ai' }).fill('admin@gymflow.ai');
|
||||||
await page.locator('input[type="password"]').fill('admin1234');
|
await page.locator('input[type="password"]').fill('admin1234');
|
||||||
await page.getByRole('button', { name: 'Login' }).click();
|
await page.getByRole('button', { name: 'Login' }).click();
|
||||||
|
|||||||
Reference in New Issue
Block a user