buster/apps/web/playwright.config.ts

103 lines
2.9 KiB
TypeScript
Raw Permalink Normal View History

Biome linter test (#336) * update files for use with biom * fix prettier formats * minor biome fixes * fix additional files * update linting rules * fix additional linting errors * fix linting errors * update lib * run check in the lib direcotyr * update some linting errors * fix problems * move addtional files to stricter linting * fix imports and linting errors * update some biome settings * fix query parser * quick wins * update files * fix addtional things * fix context files * update additional biome files * fix additional files * biome fixes * fixin files * fix broken * fix additional files and problems * fix biome buster stuff * fix helpers and * stricter linting * fixed * fix missing types * fix linting * remove missing imports * update more biome test stuff * update fixes * update imports * more updates * fix some linting errors * fix broken children as prop errors * lint ci * update lint check * Update package.json * Update next.config.mjs * fix some broken tests * update some tests * chore(versions): bump api to v0.1.16; bump web to v0.1.16; bump cli to v0.1.16 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-unit-tests.yml * fix some tests * chore(versions): bump api to v0.1.17; bump web to v0.1.17; bump cli to v0.1.17 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update ignore files * chore(versions): bump api to v0.1.18; bump web to v0.1.18; bump cli to v0.1.18 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-lint.yml * chore(versions): bump api to v0.1.19; bump web to v0.1.19; bump cli to v0.1.19 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update boime package settings * chore(versions): bump api to v0.1.20; bump web to v0.1.20; bump cli to v0.1.20 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * save to dropdown bug fixes * update console logs * update chart animation * chore(versions): bump api to v0.1.21; bump web to v0.1.21; bump cli to v0.1.21 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update build * chore(versions): bump api to v0.1.22; bump web to v0.1.22; bump cli to v0.1.22 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * additinal updates for biome 2 * update imports * chore(versions): bump api to v0.1.23; bump web to v0.1.23; bump cli to v0.1.23 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * final updates * chore(versions): bump api to v0.1.24; bump web to v0.1.24; bump cli to v0.1.24 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update dashboard-updates.test.ts * chore(versions): bump api to v0.1.25; bump web to v0.1.25; bump cli to v0.1.25 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * crazy fix * chore(versions): bump api to v0.1.26; bump web to v0.1.26; bump cli to v0.1.26 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * more attempts for stable tests * chore(versions): bump api to v0.1.27; bump web to v0.1.27; bump cli to v0.1.27 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update tests * split the test off * chore(versions): bump api to v0.1.28; bump web to v0.1.28; bump cli to v0.1.28 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update pie-styling-updates.spec.ts * Create web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.29; bump web to v0.1.29; bump cli to v0.1.29 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update tests * chore(versions): bump api to v0.1.30; bump web to v0.1.30; bump cli to v0.1.30 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.31; bump web to v0.1.31; bump cli to v0.1.31 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.32; bump web to v0.1.32; bump cli to v0.1.32 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.33; bump web to v0.1.33; bump cli to v0.1.33 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.34; bump web to v0.1.34; bump cli to v0.1.34 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * Update web-e2e-tests-optimized.yml * Revert "Update web-e2e-tests-optimized.yml" This reverts commit dfc9263a2621f1c00dee30e28dbb01a9f8f914ef. * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.35; bump web to v0.1.35; bump cli to v0.1.35 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.36; bump web to v0.1.36; bump cli to v0.1.36 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-31 01:16:48 +08:00
import fs from 'node:fs';
import path from 'node:path';
2025-08-06 00:22:53 +08:00
import { fileURLToPath } from 'node:url';
2025-04-26 05:12:18 +08:00
import { defineConfig, devices } from '@playwright/test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
import dotenv from 'dotenv';
Biome linter test (#336) * update files for use with biom * fix prettier formats * minor biome fixes * fix additional files * update linting rules * fix additional linting errors * fix linting errors * update lib * run check in the lib direcotyr * update some linting errors * fix problems * move addtional files to stricter linting * fix imports and linting errors * update some biome settings * fix query parser * quick wins * update files * fix addtional things * fix context files * update additional biome files * fix additional files * biome fixes * fixin files * fix broken * fix additional files and problems * fix biome buster stuff * fix helpers and * stricter linting * fixed * fix missing types * fix linting * remove missing imports * update more biome test stuff * update fixes * update imports * more updates * fix some linting errors * fix broken children as prop errors * lint ci * update lint check * Update package.json * Update next.config.mjs * fix some broken tests * update some tests * chore(versions): bump api to v0.1.16; bump web to v0.1.16; bump cli to v0.1.16 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-unit-tests.yml * fix some tests * chore(versions): bump api to v0.1.17; bump web to v0.1.17; bump cli to v0.1.17 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update ignore files * chore(versions): bump api to v0.1.18; bump web to v0.1.18; bump cli to v0.1.18 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-lint.yml * chore(versions): bump api to v0.1.19; bump web to v0.1.19; bump cli to v0.1.19 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update boime package settings * chore(versions): bump api to v0.1.20; bump web to v0.1.20; bump cli to v0.1.20 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * save to dropdown bug fixes * update console logs * update chart animation * chore(versions): bump api to v0.1.21; bump web to v0.1.21; bump cli to v0.1.21 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update build * chore(versions): bump api to v0.1.22; bump web to v0.1.22; bump cli to v0.1.22 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * additinal updates for biome 2 * update imports * chore(versions): bump api to v0.1.23; bump web to v0.1.23; bump cli to v0.1.23 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * final updates * chore(versions): bump api to v0.1.24; bump web to v0.1.24; bump cli to v0.1.24 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update dashboard-updates.test.ts * chore(versions): bump api to v0.1.25; bump web to v0.1.25; bump cli to v0.1.25 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * crazy fix * chore(versions): bump api to v0.1.26; bump web to v0.1.26; bump cli to v0.1.26 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * more attempts for stable tests * chore(versions): bump api to v0.1.27; bump web to v0.1.27; bump cli to v0.1.27 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update tests * split the test off * chore(versions): bump api to v0.1.28; bump web to v0.1.28; bump cli to v0.1.28 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update pie-styling-updates.spec.ts * Create web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.29; bump web to v0.1.29; bump cli to v0.1.29 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update tests * chore(versions): bump api to v0.1.30; bump web to v0.1.30; bump cli to v0.1.30 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.31; bump web to v0.1.31; bump cli to v0.1.31 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.32; bump web to v0.1.32; bump cli to v0.1.32 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.33; bump web to v0.1.33; bump cli to v0.1.33 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.34; bump web to v0.1.34; bump cli to v0.1.34 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * Update web-e2e-tests-optimized.yml * Revert "Update web-e2e-tests-optimized.yml" This reverts commit dfc9263a2621f1c00dee30e28dbb01a9f8f914ef. * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.35; bump web to v0.1.35; bump cli to v0.1.35 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.36; bump web to v0.1.36; bump cli to v0.1.36 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-31 01:16:48 +08:00
2025-04-26 05:12:18 +08:00
dotenv.config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './playwright-tests',
/* Run tests in files in parallel */
2025-04-28 23:58:10 +08:00
fullyParallel: false,
2025-04-26 05:12:18 +08:00
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* timeout for each test */
timeout: 1000 * 60 * 2.5,
2025-04-26 05:12:18 +08:00
/* Retry on CI only */
2025-05-14 03:36:57 +08:00
retries: process.env.CI ? 2 : 1,
Biome linter test (#336) * update files for use with biom * fix prettier formats * minor biome fixes * fix additional files * update linting rules * fix additional linting errors * fix linting errors * update lib * run check in the lib direcotyr * update some linting errors * fix problems * move addtional files to stricter linting * fix imports and linting errors * update some biome settings * fix query parser * quick wins * update files * fix addtional things * fix context files * update additional biome files * fix additional files * biome fixes * fixin files * fix broken * fix additional files and problems * fix biome buster stuff * fix helpers and * stricter linting * fixed * fix missing types * fix linting * remove missing imports * update more biome test stuff * update fixes * update imports * more updates * fix some linting errors * fix broken children as prop errors * lint ci * update lint check * Update package.json * Update next.config.mjs * fix some broken tests * update some tests * chore(versions): bump api to v0.1.16; bump web to v0.1.16; bump cli to v0.1.16 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-unit-tests.yml * fix some tests * chore(versions): bump api to v0.1.17; bump web to v0.1.17; bump cli to v0.1.17 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update ignore files * chore(versions): bump api to v0.1.18; bump web to v0.1.18; bump cli to v0.1.18 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-lint.yml * chore(versions): bump api to v0.1.19; bump web to v0.1.19; bump cli to v0.1.19 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update boime package settings * chore(versions): bump api to v0.1.20; bump web to v0.1.20; bump cli to v0.1.20 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * save to dropdown bug fixes * update console logs * update chart animation * chore(versions): bump api to v0.1.21; bump web to v0.1.21; bump cli to v0.1.21 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update build * chore(versions): bump api to v0.1.22; bump web to v0.1.22; bump cli to v0.1.22 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * additinal updates for biome 2 * update imports * chore(versions): bump api to v0.1.23; bump web to v0.1.23; bump cli to v0.1.23 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * final updates * chore(versions): bump api to v0.1.24; bump web to v0.1.24; bump cli to v0.1.24 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update dashboard-updates.test.ts * chore(versions): bump api to v0.1.25; bump web to v0.1.25; bump cli to v0.1.25 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * crazy fix * chore(versions): bump api to v0.1.26; bump web to v0.1.26; bump cli to v0.1.26 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * more attempts for stable tests * chore(versions): bump api to v0.1.27; bump web to v0.1.27; bump cli to v0.1.27 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update tests * split the test off * chore(versions): bump api to v0.1.28; bump web to v0.1.28; bump cli to v0.1.28 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update pie-styling-updates.spec.ts * Create web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.29; bump web to v0.1.29; bump cli to v0.1.29 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * update tests * chore(versions): bump api to v0.1.30; bump web to v0.1.30; bump cli to v0.1.30 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.31; bump web to v0.1.31; bump cli to v0.1.31 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.32; bump web to v0.1.32; bump cli to v0.1.32 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.33; bump web to v0.1.33; bump cli to v0.1.33 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.34; bump web to v0.1.34; bump cli to v0.1.34 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * Update web-e2e-tests-optimized.yml * Revert "Update web-e2e-tests-optimized.yml" This reverts commit dfc9263a2621f1c00dee30e28dbb01a9f8f914ef. * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.35; bump web to v0.1.35; bump cli to v0.1.35 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] * Update web-e2e-tests-optimized.yml * chore(versions): bump api to v0.1.36; bump web to v0.1.36; bump cli to v0.1.36 [skip ci] * chore: update tag_info.json with potential release versions [skip ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-31 01:16:48 +08:00
/* Run 2 tests in parallel */
workers: process.env.CI ? 1 : 10,
2025-04-26 05:12:18 +08:00
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://localhost:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
/* Capture screenshot on failure */
2025-05-02 04:02:51 +08:00
screenshot: 'on',
2025-04-28 23:58:10 +08:00
/* Run tests in headed mode (non-headless) */
headless: true,
2025-05-02 05:31:05 +08:00
/* Use stored auth state only if it exists */
2025-08-06 00:22:53 +08:00
storageState: fs.existsSync(
path.join(
path.dirname(fileURLToPath(import.meta.url)),
'playwright-tests/auth-utils/auth.json'
)
)
? path.join(
path.dirname(fileURLToPath(import.meta.url)),
'playwright-tests/auth-utils/auth.json'
)
2025-05-02 05:31:05 +08:00
: undefined
2025-04-26 05:12:18 +08:00
},
2025-05-02 05:31:05 +08:00
/* Global setup to run before all tests */
globalSetup: './playwright-tests/auth-utils/global-setup.ts',
/* Global teardown to run after all tests */
globalTeardown: './playwright-tests/auth-utils/global-teardown.ts',
2025-04-26 05:12:18 +08:00
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
}
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] }
// },
2025-04-26 05:12:18 +08:00
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] }
// }
2025-04-26 05:12:18 +08:00
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
],
/* Run your local dev server before starting the tests */
webServer: {
2025-05-03 05:37:07 +08:00
command: process.env.PLAYWRIGHT_START_COMMAND || 'make start-fast',
2025-04-26 05:12:18 +08:00
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
timeout: 60 * 1000 * 6,
stdout: 'pipe',
stderr: 'pipe'
2025-04-26 05:12:18 +08:00
}
});