fix: Enhance Dockerfile and scripts for improved dependency management and coverage reporting
This commit is contained in:
@@ -35,6 +35,10 @@ if (!process.env.PLAYWRIGHT_BASE_URL) {
|
||||
// to restore the legacy dependency behavior when needed.
|
||||
const skipSecurityDeps = process.env.PLAYWRIGHT_SKIP_SECURITY_DEPS !== '0';
|
||||
const browserDependencies = skipSecurityDeps ? ['setup'] : ['setup', 'security-tests'];
|
||||
const crossBrowserCaddyImportSpec =
|
||||
/security-enforcement\/zzz-caddy-imports\/caddy-import-cross-browser\.spec\.(ts|js)$/;
|
||||
const securityEnforcementExceptCrossBrowser =
|
||||
/security-enforcement\/(?!zzz-caddy-imports\/caddy-import-cross-browser\.spec\.(ts|js)$).*/;
|
||||
|
||||
const coverageReporterConfig = enableCoverage ? defineCoverageReporterConfig({
|
||||
sourceRoot: __dirname,
|
||||
@@ -262,7 +266,8 @@ export default defineConfig({
|
||||
storageState: STORAGE_STATE,
|
||||
},
|
||||
dependencies: browserDependencies,
|
||||
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', '**/security-enforcement/**', '**/security/**'],
|
||||
testMatch: [crossBrowserCaddyImportSpec, /.*\.spec\.(ts|js)$/],
|
||||
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', securityEnforcementExceptCrossBrowser, '**/security/**'],
|
||||
},
|
||||
|
||||
{
|
||||
@@ -272,7 +277,8 @@ export default defineConfig({
|
||||
storageState: STORAGE_STATE,
|
||||
},
|
||||
dependencies: browserDependencies,
|
||||
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', '**/security-enforcement/**', '**/security/**'],
|
||||
testMatch: [crossBrowserCaddyImportSpec, /.*\.spec\.(ts|js)$/],
|
||||
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', securityEnforcementExceptCrossBrowser, '**/security/**'],
|
||||
},
|
||||
|
||||
{
|
||||
@@ -282,7 +288,8 @@ export default defineConfig({
|
||||
storageState: STORAGE_STATE,
|
||||
},
|
||||
dependencies: browserDependencies,
|
||||
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', '**/security-enforcement/**', '**/security/**'],
|
||||
testMatch: [crossBrowserCaddyImportSpec, /.*\.spec\.(ts|js)$/],
|
||||
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', securityEnforcementExceptCrossBrowser, '**/security/**'],
|
||||
},
|
||||
|
||||
/* Test against mobile viewports. */
|
||||
|
||||
Reference in New Issue
Block a user