feat(e2e): Fix authentication tests and environment handling

This commit is contained in:
Rakshit Tiwari 2025-06-17 23:35:42 +05:30
parent 20100e120b
commit a3bfbf5948
15 changed files with 324 additions and 43 deletions

View file

@ -1,8 +1,8 @@
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';
import path from 'path';
import mainConfig from './playwright.config';
const absolutePath = path.resolve(process.cwd(), 'api/server/index.js');
dotenv.config();
const config: PlaywrightTestConfig = {
@ -41,6 +41,14 @@ const config: PlaywrightTestConfig = {
MESSAGE_USER_WINDOW: '1',
},
},
// Override shared use settings for local debug make browser visible
// each test opens its own visible Chromium instance, so we can see what's happening
use: {
...mainConfig.use,
headless: false,
baseURL: 'http://localhost:3090',
storageState: path.resolve(process.cwd(), 'e2e/storageState.json'),
},
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/,