Pulse/tests/integration/playwright.config.ts
rcourtman f8fba328dd Recover the long-tail E2E quarantine batch against current surfaces
Delist nineteen quarantined specs (69 green, 13 env-gated skips in one
full-batch run); 05/19/20/30/52/60/63/77/79 passed unchanged. 03 stays
quarantined with its reason recorded inline: multi-tenant scenarios 6/7
carry an unresolved org-resolution bug that CI's multi-tenant
environment would exercise, and 47/48 still await their concept rework.

- 15: organization panels only exist in multi-tenant installs, so those
  routes now skip when the feature is off, and the Remote Access shell
  description follows the refreshed Relay copy.
- 17: the backups page defaults to the guest-centric Coverage view when
  anything needs attention; the day-activity assertions enter the By
  date view first.
- 18/51: the Patrol page crashed to its error boundary under stale
  autonomy stubs; the stubs now carry the requested/effective levels and
  autopilot acknowledgement the page reads, and the paused copy is
  sentence-case.
- 43: rewritten as a platform-pages tour (TrueNAS, vSphere, Proxmox,
  Docker, PBS, PMG) since the settings platform views it pinned were
  retired to a 404 with the legacy aliases.
- 49: the demo-estate proof follows the per-platform IA and drops a
  self-contradictory storage exclusion that could never pass alongside
  the west-a-service-pool assertion.
- 57: the RC Preview badge only renders in the authenticated shell, so
  the spec signs in instead of stubbing the session.
- 62: the retired platform-management aliases deliberately 404 now
  (cfb16e6da); the spec pins the graceful not-found page instead of the
  removed redirect.
- 75: switches to cookie-session auth (the token path leaves
  page.request unauthenticated), anchors on the Connection posture
  region, and drops the retired operations sub-route.
- 84: a missing lab artifact is now a skip rather than a hard failure.

Contract-Neutral: E2E quarantine recovery, spec re-pins verified green on a fresh managed backend
2026-07-18 23:15:25 +01:00

133 lines
4.5 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
import { preferredBrowserBaseURL } from './tests/runtime-defaults';
/**
* QUARANTINE (2026-07-17): these specs assert the pre-platform-first UI
* (element locators, URLs, and subheader copy that the June IA rebuild
* replaced) and have failed on every push since 2026-06-29, drowning the
* signal from the healthy specs. Quarantining them keeps the rest of the
* suite as a live per-push gate while each file is re-pinned to the
* current UI and removed from this list. This is a stopgap, not a fix:
* the recovery work is tracked as its own effort, and a spec leaves this
* list only by being repaired, never by deletion.
*/
const QUARANTINED_SPECS = [
// Multi-tenant scenarios 6/7 have an unresolved org-resolution bug (see
// core-e2e-failure-taxonomy): after switchOrg+reload the UI still resolves
// the default org. CI runs a multi-tenant environment, so delisting this
// spec turns that open bug into a permanent red.
'**/03-multi-tenant.spec.ts',
'**/47-inline-selection-scroll-stability.spec.ts',
'**/48-summary-hover-selection.spec.ts',
];
/**
* Playwright configuration for Pulse update integration tests
* See https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './tests',
/* Run tests in files in parallel */
fullyParallel: false, // Update tests should run sequentially
/* Fail the build on CI if you accidentally left test.only in the source code */
forbidOnly: !!process.env.CI,
/* Retry once on CI to absorb flake; a second retry only multiplies the
cost of real failures (each settings-shell failure costs ~14s/attempt,
a failing visual crawl over 5 minutes). */
retries: process.env.CI ? 1 : 0,
/* On CI, a broken test environment fails most of the suite; abort early so
the run produces a red completed verdict with a report instead of
grinding until the job timeout cancels it with no verdict at all. */
maxFailures: process.env.CI ? 20 : 0,
/* Opt out of parallel tests on CI */
workers: 1, // Update tests modify global state
/* Reporter to use */
reporter: [
['html', { outputFolder: 'playwright-report', open: 'never' }],
['list'],
['junit', { outputFile: 'test-results/junit.xml' }]
],
/* Shared test timeout */
timeout: 60000, // Updates can take time
expect: {
timeout: 10000,
},
/* Shared settings for all projects */
use: {
/* Base URL for all tests */
baseURL: preferredBrowserBaseURL(),
/* Allow testing against self-signed TLS when explicitly enabled */
ignoreHTTPSErrors: ['1', 'true', 'yes', 'on'].includes(
String(process.env.PULSE_E2E_INSECURE_TLS || '').trim().toLowerCase(),
),
/* Collect trace when retrying the failed test */
trace: 'on-first-retry',
/* Screenshot on failure */
screenshot: 'only-on-failure',
/* Video on failure */
video: 'retain-on-failure',
/* Default navigation timeout */
navigationTimeout: 15000,
/* Default action timeout */
actionTimeout: 10000,
},
/* Configure projects for different browsers */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
// Mobile-specific tests are intentionally excluded from the desktop project;
// they rely on mobile viewports where md:hidden nav is visible, tables overflow, etc.
testIgnore: [...QUARANTINED_SPECS, '**/04-mobile.spec.ts'],
},
{
name: 'mobile-chrome',
use: {
...devices['Pixel 5'],
},
// Journey tests skip on mobile projects (all use test.skip for mobile-*),
// so exclude them to avoid unnecessary browser launches. The visual
// crawl takes 5+ minutes per project; one desktop pass is the budgeted
// coverage, and dedicated mobile specs cover mobile layout.
testIgnore: [...QUARANTINED_SPECS, '**/journeys/**', '**/99-visual-crawl.spec.ts'],
},
{
name: 'mobile-safari',
use: {
...devices['iPhone 12'],
},
testIgnore: [...QUARANTINED_SPECS, '**/journeys/**', '**/99-visual-crawl.spec.ts'],
},
// Uncomment to test on Firefox and WebKit
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
],
/* Run local dev server before starting the tests */
// We use docker-compose instead, managed via npm scripts
webServer: undefined,
});