Headless wird sicher erzwungen (auch wenn lokal anders).
Der Next.js-Server wird gebaut und via npm start im selben Container gestartet (statt npm run dev). Robustere Browser-Flags für Container. Artefakte (Trace/Screenshot/Video) nur bei Fehlern, damit der CI schnell bleibt. baseURL kommt aus ENV (E2E_BASE_URL) – lokal bleibt’s http://localhost:3000. PLAYWRIGHT_BROWSERS_PATH=0 bleibt (Option B).
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.778
|
NEXT_PUBLIC_APP_VERSION=1.6.779
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.778
|
NEXT_PUBLIC_APP_VERSION=1.6.779
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
# .woodpecker.yml — Option B (Browser im Workspace)
|
# .woodpecker.yml — Option B (Browser im Workspace, stabil für CI)
|
||||||
steps:
|
steps:
|
||||||
- name: install-dependencies-and-browsers
|
- name: install-dependencies-and-browsers
|
||||||
image: node:22
|
image: node:22
|
||||||
environment:
|
environment:
|
||||||
PLAYWRIGHT_BROWSERS_PATH: "0" # Browser in ./node_modules/playwright/.local-browsers
|
PLAYWRIGHT_BROWSERS_PATH: "0" # Browser in ./node_modules/playwright/.local-browsers
|
||||||
CI: "true"
|
CI: "true"
|
||||||
|
E2E_BASE_URL: "http://localhost:3000"
|
||||||
|
LANG: "C.UTF-8"
|
||||||
|
TZ: "Europe/Berlin"
|
||||||
|
PW_HEADLESS: "1" # erzwingt headless in der Config
|
||||||
commands:
|
commands:
|
||||||
- echo "📦 Installing deps..."
|
- echo "📦 Installing deps..."
|
||||||
- npm ci
|
- npm ci
|
||||||
@@ -16,8 +20,12 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
PLAYWRIGHT_BROWSERS_PATH: "0" # gleicher Pfad wie oben
|
PLAYWRIGHT_BROWSERS_PATH: "0" # gleicher Pfad wie oben
|
||||||
CI: "true"
|
CI: "true"
|
||||||
|
E2E_BASE_URL: "http://localhost:3000"
|
||||||
|
LANG: "C.UTF-8"
|
||||||
|
TZ: "Europe/Berlin"
|
||||||
|
PW_HEADLESS: "1"
|
||||||
commands:
|
commands:
|
||||||
- echo "🔧 Installing system dependencies for Playwright..."
|
- echo "🔧 Installing system dependencies for Playwright..."
|
||||||
- npx playwright install-deps
|
- npx playwright install-deps
|
||||||
- echo "🧪 Running Playwright tests (Chromium only)..."
|
- echo "🧪 Running Playwright tests (Chromium only)..."
|
||||||
- npx playwright test --project=chromium
|
- npx playwright test --project=chromium --headless
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.6.779] – 2025-08-29
|
||||||
|
|
||||||
|
- fix: start chromium headless
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.778] – 2025-08-29
|
## [1.6.778] – 2025-08-29
|
||||||
|
|
||||||
- test: meldungenTest.ts
|
- test: meldungenTest.ts
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.778",
|
"version": "1.6.779",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.778",
|
"version": "1.6.779",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.778",
|
"version": "1.6.779",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,28 +1,53 @@
|
|||||||
import { defineConfig, devices } from "@playwright/test";
|
import { defineConfig, devices } from "@playwright/test";
|
||||||
|
|
||||||
|
const CI = !!process.env.CI;
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: "./playwright/tests",
|
testDir: "./playwright/tests",
|
||||||
|
|
||||||
|
// Globale Zeitlimits
|
||||||
timeout: 90_000,
|
timeout: 90_000,
|
||||||
expect: { timeout: 10_000 },
|
expect: { timeout: 15_000 }, // etwas großzügiger im CI
|
||||||
|
|
||||||
|
// Setup/Parallelisierung
|
||||||
globalSetup: "./playwright/global-setup",
|
globalSetup: "./playwright/global-setup",
|
||||||
fullyParallel: true,
|
fullyParallel: true,
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: CI,
|
||||||
retries: process.env.CI ? 2 : 0,
|
retries: CI ? 2 : 0,
|
||||||
workers: process.env.CI ? 1 : undefined,
|
workers: CI ? 1 : undefined,
|
||||||
|
|
||||||
reporter: [["html", { outputFolder: "playwright/report" }]],
|
// Reporter & Ausgabepfade
|
||||||
|
reporter: [
|
||||||
|
["list"],
|
||||||
|
["html", { outputFolder: "playwright/report", open: "never" }],
|
||||||
|
],
|
||||||
outputDir: "playwright/test-results",
|
outputDir: "playwright/test-results",
|
||||||
|
|
||||||
|
// Standard-Defaults für alle Tests/Projekte
|
||||||
use: {
|
use: {
|
||||||
baseURL: "http://localhost:3000",
|
// Base-URL: im CI per ENV steuerbar
|
||||||
headless: true,
|
baseURL: process.env.E2E_BASE_URL || "http://localhost:3000",
|
||||||
launchOptions: { slowMo: 300 },
|
|
||||||
|
// Headless im CI (und wenn PW_HEADLESS=1); lokal darfst du headed verwenden
|
||||||
|
headless: process.env.PW_HEADLESS === "1" || CI,
|
||||||
|
|
||||||
|
// Container-robuste Flags
|
||||||
|
launchOptions: {
|
||||||
|
args: ["--no-sandbox", "--disable-dev-shm-usage"],
|
||||||
|
},
|
||||||
|
|
||||||
viewport: { width: 1920, height: 1080 },
|
viewport: { width: 1920, height: 1080 },
|
||||||
video: "on",
|
|
||||||
screenshot: "on",
|
// Artefakte – sparsam, aber genug fürs Debugging
|
||||||
trace: "on-first-retry",
|
video: CI ? "retain-on-failure" : "on-first-retry",
|
||||||
|
screenshot: CI ? "only-on-failure" : "only-on-failure",
|
||||||
|
trace: "retain-on-failure",
|
||||||
|
|
||||||
|
// Optional: falls du Test-IDs nutzt
|
||||||
|
testIdAttribute: "data-testid",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Projekte (nur Chromium)
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
name: "chromium",
|
name: "chromium",
|
||||||
@@ -30,9 +55,11 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Webserver: baue & starte Next.js (statt "dev")
|
||||||
webServer: {
|
webServer: {
|
||||||
command: "npm run dev",
|
command: "npm run build && npm run start -p 3000",
|
||||||
url: "http://localhost:3000",
|
url: process.env.E2E_BASE_URL || "http://localhost:3000",
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !CI,
|
||||||
|
timeout: 120_000, // Zeit für Build+Start
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user