chore: Add some tests
All checks were successful
Pull Request Labeler / labeler (pull_request_target) Successful in 5s
CI / Get Changed Files (pull_request) Successful in 11s
Label PRs based on size / Check PR size (pull_request) Successful in 11s
Claude PR Review / claude-code (pull_request) Successful in 33s
CI / eslint (pull_request) Successful in 40s
CI / oxlint (pull_request) Successful in 46s
CI / prettier (pull_request) Successful in 50s
CI / Docker backend validation (pull_request) Successful in 34s
CI / Docker frontend validation (pull_request) Successful in 1m27s
CI / test-build (pull_request) Successful in 1m32s
CI / Checkstyle Main (pull_request) Successful in 1m43s
CI / Backend Tests (pull_request) Successful in 2m31s
CI / Playwright (pull_request) Successful in 2m18s
All checks were successful
Pull Request Labeler / labeler (pull_request_target) Successful in 5s
CI / Get Changed Files (pull_request) Successful in 11s
Label PRs based on size / Check PR size (pull_request) Successful in 11s
Claude PR Review / claude-code (pull_request) Successful in 33s
CI / eslint (pull_request) Successful in 40s
CI / oxlint (pull_request) Successful in 46s
CI / prettier (pull_request) Successful in 50s
CI / Docker backend validation (pull_request) Successful in 34s
CI / Docker frontend validation (pull_request) Successful in 1m27s
CI / test-build (pull_request) Successful in 1m32s
CI / Checkstyle Main (pull_request) Successful in 1m43s
CI / Backend Tests (pull_request) Successful in 2m31s
CI / Playwright (pull_request) Successful in 2m18s
This commit is contained in:
parent
551f5bcf2e
commit
e828efdfa7
13 changed files with 224 additions and 15 deletions
49
frontend/playwright.config.ts
Normal file
49
frontend/playwright.config.ts
Normal file
|
@ -0,0 +1,49 @@
|
|||
// playwright.config.ts (or .js)
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: 'html',
|
||||
use: {
|
||||
// This baseURL is for your frontend tests.
|
||||
// Tests hitting the backend directly will use absolute URLs.
|
||||
baseURL: 'http://localhost:4200',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
{
|
||||
name: 'firefox',
|
||||
use: { ...devices['Desktop Firefox'] },
|
||||
},
|
||||
],
|
||||
|
||||
webServer: {
|
||||
command:
|
||||
'cd .. && conc -n "frontend,backend" "cd frontend && bun run start" "cd backend/ && watchexec -r -e java ./gradlew :bootRun"',
|
||||
// **IMPORTANT CHANGE HERE:**
|
||||
// Point to your backend's health check endpoint.
|
||||
// If your Spring Boot app uses Actuator, it might be /actuator/health
|
||||
// Verify the correct health endpoint for your backend.
|
||||
url: 'http://localhost:8080/health', // Or "http://localhost:8080/actuator/health"
|
||||
reuseExistingServer: !process.env.CI,
|
||||
// **INCREASE TIMEOUT SIGNIFICANTLY**
|
||||
// Gradle + Spring Boot can take a while, especially on first run or in CI.
|
||||
// Adjust as needed, e.g., 3-5 minutes.
|
||||
timeout: 300 * 1000, // 300 seconds = 5 minutes
|
||||
stdout: 'pipe', // Good for capturing logs in CI reports
|
||||
stderr: 'pipe',
|
||||
// Optional: If your server needs specific environment variables
|
||||
// env: {
|
||||
// SPRING_PROFILES_ACTIVE: 'test', // Example for Spring Boot
|
||||
// },
|
||||
},
|
||||
});
|
Reference in a new issue