diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ab07ec36..ff127684b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,4 +28,4 @@ jobs: npm run lint - name: Test - run: npm run test:headless + run: npm run test:ci diff --git a/package.json b/package.json index cacc445e1..93da79b77 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:prod": "ng build --configuration production", "build-and-copy-local": "npm run build:prod && ./scripts/copy-to-portal.sh ../evento-portal/public/apps/webapp-schulverwaltung/", "test": "ng test", - "test:headless": "ng test --watch=false --browsers=ChromiumHeadless", + "test:ci": "ng test --watch=false --browsers=ChromeHeadlessCI", "test:watch": "ng test --browsers=ChromiumHeadless", "test:brief": "ng test --browsers=ChromiumHeadless --reporters brief", "test:coverage": "ng test --browsers=ChromiumHeadless --code-coverage --reporters coverage-istanbul", diff --git a/src/karma.conf.js b/src/karma.conf.js index a46039071..d971e53a0 100644 --- a/src/karma.conf.js +++ b/src/karma.conf.js @@ -36,5 +36,11 @@ module.exports = function (config) { browsers: ["Chromium"], singleRun: false, restartOnFileChange: true, + customLaunchers: { + ChromeHeadlessCI: { + base: "ChromeHeadless", + flags: ["--no-sandbox"], + }, + }, }); };