Testf from IP to localhost. Fixed some tests.
This commit is contained in:
@@ -5,8 +5,8 @@ import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('I. Core & Authentication', () => {
|
||||
test('A. Login - Successful Authentication', async ({ page }) => {
|
||||
// 1. Navigate to the login page (http://192.168.50.234:3000/).
|
||||
await page.goto('http://192.168.50.234:3000/');
|
||||
// 1. Navigate to the login page (http://localhost:3000/).
|
||||
await page.goto('http://localhost:3000/');
|
||||
|
||||
// 2. Enter a valid email in the email field.
|
||||
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.
|
||||
await page.getByRole('button', { name: 'Login' }).click();
|
||||
|
||||
// Wait for navigation to complete
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Expected Results:
|
||||
// - 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.
|
||||
await expect(page.locator('text=Invalid credentials')).not.toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user