Skip to content

Commit

Permalink
rename authenticatedPage to pageWithACreatedUser
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Jan 10, 2025
1 parent 4949bb8 commit d3767ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions integration-tests/tests/fixtures/auth.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { AuthPage } from '../pages/auth.page';
import { TestAccount } from '../types/auth.types';

type TestFixtures = {
authenticatedPage: Page;
pageWithACreatedUser: Page;
testAccount: TestAccount;
};

export const test = base.extend<TestFixtures>({
authenticatedPage: async ({ page }, use) => {
pageWithACreatedUser: async ({ page }, use) => {
const authPage = new AuthPage(page);

const testAccount = {
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/tests/fixtures/group.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type GroupFixtures = {
};

export const test = authTest.extend<GroupFixtures>({
pageWithGroup: async ({ authenticatedPage }, use) => {
const groupPage = new GroupPage(authenticatedPage);
pageWithGroup: async ({ pageWithACreatedUser }, use) => {
const groupPage = new GroupPage(pageWithACreatedUser);

const testGroup = {
name: `test_group_${uuidv4().slice(0, 8)}`,
Expand All @@ -31,7 +31,7 @@ export const test = authTest.extend<GroupFixtures>({
await groupPage.navigateToCreateGroupPage();
await groupPage.createGroup(testGroup);

await use(authenticatedPage);
await use(pageWithACreatedUser);
// Cleanup would go here if needed
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from '@playwright/test';
import { test } from '../../fixtures/auth.fixture';

test.describe('Basic test of authenticated fixture', () => {
test('authenticated fixture runs', async ({ authenticatedPage }) => {
test('authenticated fixture runs', async ({ pageWithACreatedUser }) => {

});
});
4 changes: 2 additions & 2 deletions integration-tests/tests/specs/group/creategroup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { test } from '../../fixtures/auth.fixture';
import { GroupPage } from '../../pages/group.page';

test.describe('Group creation', () => {
test('can create group', async ({ authenticatedPage }) => {
const groupPage = new GroupPage(authenticatedPage);
test('can create group', async ({ pageWithACreatedUser }) => {
const groupPage = new GroupPage(pageWithACreatedUser);


// Create a new group
Expand Down

0 comments on commit d3767ff

Please sign in to comment.