feat: Add e2e setup and tests (#535)

This commit is contained in:
Jovan Milosevic
2025-02-12 08:57:18 +01:00
committed by GitHub
parent e00dad9200
commit 6794ab20d3
19 changed files with 366 additions and 42 deletions
+26
View File
@@ -0,0 +1,26 @@
import * as path from 'path'
import { defineConfig } from '@playwright/test'
const __dirname = import.meta.dirname
const tuonoDir = path.join(__dirname, '../../../', 'target', 'debug', 'tuono')
const setupScript = path.join(__dirname, '../..', 'e2e-test-setup.js')
export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
webServer: {
command: `node ${setupScript} && ${tuonoDir} dev`,
port: 3000,
timeout: 420 * 1000,
stdout: 'pipe',
reuseExistingServer: false,
},
use: {
baseURL: 'http://localhost:3000',
},
})