feat: add Playwright E2E smoke tests
Adds Playwright E2E smoke tests following the headlamp-polaris-plugin pattern. Tests target a dedicated Headlamp instance in the privilegedescalation-dev namespace. - playwright.config.ts: Playwright configuration with auth state - e2e/auth.setup.ts: OIDC (Authentik) and token-based auth setup - e2e/intel-gpu.spec.ts: 5 smoke tests covering sidebar, overview, device-plugins page, settings, and inter-view navigation - scripts/deploy-e2e-headlamp.sh: deploys stock Headlamp with plugin injected via ConfigMap into privilegedescalation-dev - scripts/teardown-e2e-headlamp.sh: tears down all E2E resources - package.json: adds @playwright/test dev dep, e2e/e2e:headed scripts - .gitignore: excludes auth state, .env.e2e, playwright-report/ Closes #24 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
timeout: 30_000,
|
||||
expect: { timeout: 10_000 },
|
||||
fullyParallel: false,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
reporter: 'list',
|
||||
use: {
|
||||
baseURL: process.env.HEADLAMP_URL || 'https://headlamp.animaniacs.farh.net',
|
||||
trace: 'on-first-retry',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
projects: [
|
||||
{ name: 'setup', testMatch: /auth\.setup\.ts/, timeout: 60_000 },
|
||||
{
|
||||
name: 'chromium',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
storageState: 'e2e/.auth/state.json',
|
||||
},
|
||||
dependencies: ['setup'],
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user