Some workout management tests fixed with Antigravity
This commit is contained in:
@@ -4,7 +4,7 @@ import { request } from '@playwright/test';
|
||||
|
||||
// Define the type for our custom fixtures
|
||||
type MyFixtures = {
|
||||
createUniqueUser: () => Promise<{ email: string, password: string, id: string }>;
|
||||
createUniqueUser: () => Promise<{ email: string, password: string, id: string, token: string }>;
|
||||
};
|
||||
|
||||
// Extend the base test with our custom fixture
|
||||
@@ -13,7 +13,7 @@ export const test = base.extend<MyFixtures>({
|
||||
// We use a new API context for setup to avoid polluting request history,
|
||||
// although setup requests are usually separate anyway.
|
||||
const apiContext = await request.newContext({
|
||||
baseURL: 'http://localhost:3001' // Direct access to backend
|
||||
baseURL: 'http://127.0.0.1:3001' // Direct access to backend
|
||||
});
|
||||
|
||||
// Setup: Helper function to create a user
|
||||
@@ -38,7 +38,7 @@ export const test = base.extend<MyFixtures>({
|
||||
throw new Error(`Failed to register user: ${JSON.stringify(body)}`);
|
||||
}
|
||||
|
||||
return { email, password, id: body.user.id };
|
||||
return { email, password, id: body.user.id, token: body.token };
|
||||
};
|
||||
|
||||
// Use the fixture
|
||||
|
||||
Reference in New Issue
Block a user