LibreChat/e2e/playwright.config.local.ts
Danny Avila 6358383001
feat(db & e2e): Enhance DB Schemas/Controllers and Improve E2E Tests (#966)
* feat: add global teardown to remove test data and add registration/log-out to auth flow

* refactor(models/Conversation): index user field and add JSDoc to deleteConvos

* refactor: add user index to message schema and ensure user is saved to each Message

* refactor: add user to each saveMessage call

* fix: handle case where title is null in zod schema

* feat(e2e): ensure messages are deleted on cleanUp

* fix: set last convo for all endpoints on conversation update

* fix: enable registration for CI env
2023-09-18 15:19:50 -04:00

30 lines
937 B
TypeScript

import { PlaywrightTestConfig } from '@playwright/test';
import mainConfig from './playwright.config';
import path from 'path';
const absolutePath = path.resolve(process.cwd(), 'api/server/index.js');
import dotenv from 'dotenv';
dotenv.config();
const config: PlaywrightTestConfig = {
...mainConfig,
retries: 0,
globalSetup: require.resolve('./setup/global-setup.local'),
globalTeardown: require.resolve('./setup/global-teardown.local'),
webServer: {
...mainConfig.webServer,
command: `node ${absolutePath}`,
env: {
...process.env,
SEARCH: 'false',
NODE_ENV: 'development',
SESSION_EXPIRY: '60000',
REFRESH_TOKEN_EXPIRY: '300000',
},
},
fullyParallel: false, // if you are on Windows, keep this as `false`. On a Mac, `true` could make tests faster (maybe on some Windows too, just try)
// workers: 1,
// testMatch: /messages/,
// retries: 0,
};
export default config;