mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 10:02:27 -04:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
27 lines
611 B
TypeScript
27 lines
611 B
TypeScript
import {APIRequestContext, request, test as base} from '@playwright/test'
|
|
import {createSupabaseDirectClient} from 'shared/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'
|