pipeline { agent any environment { CI = 'true' } stages { stage('Install dependencies') { steps { script { if (fileExists('package-lock.json')) { bat 'npm ci' } else { bat 'npm install' } } } } stage('Run Playwright tests') { steps { bat 'npx playwright install --with-deps' bat 'npx playwright test' } } } post { always { junit 'playwright/test-results/**/*.xml' archiveArtifacts artifacts: 'playwright/test-results/**', allowEmptyArchive: true } } }