mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-05-10 16:15:23 -04:00
* 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
26 lines
709 B
TypeScript
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" |