fix(e2e): exclude deployment-smoke tests from CI via testIgnore

Smoke tests require the full Docker stack (nginx gateway, phpMyAdmin,
etc.) which is not available in CI. Excluded via playwright testIgnore
when CI=true rather than using conditional skip logic in test code.
Run locally with the stack up: npx playwright test deployment-smoke

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 11:40:56 +00:00
parent 34a8b7b75e
commit d6b19fff70
2 changed files with 3 additions and 19 deletions

View File

@@ -5,8 +5,7 @@ import { test, expect } from '@playwright/test'
* through the nginx gateway on port 80.
*
* These tests require the full Docker stack to be running.
* They are skipped automatically when the gateway is unreachable
* (e.g. in CI without the stack, or in local dev without docker compose up).
* They are NOT run in CI (excluded via playwright.config.ts testIgnore).
*
* To run locally:
* cd deployment && docker compose -f docker-compose.stack.yml up -d
@@ -15,23 +14,6 @@ import { test, expect } from '@playwright/test'
const GATEWAY = 'http://localhost'
let stackAvailable = false
test.beforeAll(async ({ request }) => {
try {
const resp = await request.get(GATEWAY, { timeout: 5000 })
stackAvailable = resp.ok()
} catch {
stackAvailable = false
}
})
test.beforeEach(async ({}, testInfo) => {
if (!stackAvailable) {
testInfo.skip()
}
})
test.describe('Deployment Smoke Tests', () => {
test.describe('Web Applications', () => {
const apps = [

View File

@@ -15,6 +15,8 @@ const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:3000/workfl
export default defineConfig({
testDir: './',
testMatch: '**/*.spec.ts',
// Smoke tests require the full Docker stack — exclude in CI
testIgnore: process.env.CI ? ['**/deployment-smoke.spec.ts'] : [],
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,