feat(e2e): add E2E test infrastructure to headlamp-tns-csi-plugin
- Add e2e/auth.setup.ts for Headlamp authentication - Add e2e/tns-csi.spec.ts smoke tests for TNS CSI plugin sidebar, navigation, and settings - Add playwright.config.ts with Chromium project and setup dependency - Add scripts/deploy-e2e-headlamp.sh for E2E Headlamp deployment - Add scripts/teardown-e2e-headlamp.sh for E2E cleanup - Add @playwright/test and e2e/e2e:headed npm scripts to package.json Refs: PRI-697, PRI-698, PRI-639 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Gandalf the Greybeard [agent]
parent
a574b65f16
commit
2f7a520ada
@@ -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 || (() => { throw new Error('HEADLAMP_URL is required — run scripts/deploy-e2e-headlamp.sh first'); })(),
|
||||
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