Files
Compass/tests/e2e/backend/fixtures/base.ts
Okechi Jones-Williams 6b11e6b060 Add minor changes to tests (#20)
* setting up test structure

* .

* added playwright config file, deleted original playwright folder and moved "some.test" file

* continued test structure setup

* Updating test folder structure

* Added database seeding script and backend testing folder structure

* removed the database test

* Replaced db seeding script

* Updated userInformation.ts to use values from choices.tsx

* merge prep

* removing extra unit test, moving api test to correct folder
2025-11-15 15:35:45 +01:00

26 lines
709 B
TypeScript

import { test as base, APIRequestContext, request } from '@playwright/test';
import { createSupabaseDirectClient } from "../../../../backend/shared/src/supabase/init";
export type TestOptions = {
backendPage: {
api: APIRequestContext,
db: any
}
}
export const test = base.extend<TestOptions>({
backendPage: async ({}, use) => {
const apiContext = await request.newContext({
baseURL: 'https://api.compassmeet.com'
});
const helpers = {
api: apiContext,
db: createSupabaseDirectClient()
}
await use(helpers)
await apiContext.dispose();
},
})
export { expect } from "@playwright/test"