Browse Source

feat(testing): Fixed CI config for playwright

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
8bc88d3c86
  1. 2
      scripts/playwright/playwright.config.ts
  2. 4
      scripts/playwright/setup/index.ts

2
scripts/playwright/playwright.config.ts

@ -96,7 +96,7 @@ const config: PlaywrightTestConfig = {
],
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
outputDir: './test-results/',
outputDir: './playwright-report',
/* Run your local dev server before starting the tests */
// webServer: {

4
scripts/playwright/setup/index.ts

@ -4,6 +4,10 @@ import { DashboardPage } from '../pages/Dashboard';
const setup = async ({page}: {page: Page}) => {
const response = await axios.get('http://localhost:8080/api/v1/meta/test/reset');
if(response.status !== 200) {
console.error('Failed to reset test data', response);
throw new Error('Failed to reset test data');
}
const token = response.data.token;
await page.addInitScript(async ({token}) => {

Loading…
Cancel
Save