Skip to content

Commit

Permalink
Fix headless Chrome sandbox error
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Dec 16, 2024
1 parent 102a636 commit e8085bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
npm run lint
- name: Test
run: npm run test:headless
run: npm run test:ci
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions src/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@ module.exports = function (config) {
browsers: ["Chromium"],
singleRun: false,
restartOnFileChange: true,
customLaunchers: {
ChromeHeadlessCI: {
base: "ChromeHeadless",
flags: ["--no-sandbox"],
},
},
});
};

0 comments on commit e8085bc

Please sign in to comment.