feat: add tests for /api/chat (#950)
This commit is contained in:
parent
4ca93aaf89
commit
a159b77fcf
9 changed files with 197 additions and 50 deletions
34
tests/fixtures.ts
Normal file
34
tests/fixtures.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { expect as baseExpect, test as baseTest } from '@playwright/test';
|
||||
import { createAuthenticatedContext, type UserContext } from './auth-helper';
|
||||
|
||||
interface Fixtures {
|
||||
adaContext: UserContext;
|
||||
babbageContext: UserContext;
|
||||
}
|
||||
|
||||
export const test = baseTest.extend<any, Fixtures>({
|
||||
adaContext: [
|
||||
async ({ browser }, use) => {
|
||||
const ada = await createAuthenticatedContext({
|
||||
browser,
|
||||
name: 'ada',
|
||||
});
|
||||
await use(ada);
|
||||
await ada.context.close();
|
||||
},
|
||||
{ scope: 'worker' },
|
||||
],
|
||||
babbageContext: [
|
||||
async ({ browser }, use) => {
|
||||
const babbage = await createAuthenticatedContext({
|
||||
browser,
|
||||
name: 'babbage',
|
||||
});
|
||||
await use(babbage);
|
||||
await babbage.context.close();
|
||||
},
|
||||
{ scope: 'worker' },
|
||||
],
|
||||
});
|
||||
|
||||
export const expect = baseExpect;
|
||||
Loading…
Add table
Add a link
Reference in a new issue