Skip to content

Commit ad2a36b

Browse files
committed
Merge branch 'main' of github.com:rdlabo-team/ionic-angular-library
2 parents 4c7cef5 + a5167c2 commit ad2a36b

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

angular.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"polyfills": [],
6969
"tsConfig": "projects/demo/tsconfig.spec.json",
7070
"karmaConfig": "karma.conf.js",
71+
"browsers": "ChromeHeadlessNoSandbox",
7172
"inlineStyleLanguage": "scss",
7273
"assets": [
7374
"projects/demo/src/favicon.ico",
@@ -117,6 +118,7 @@
117118
"options": {
118119
"tsConfig": "projects/photo-editor/tsconfig.spec.json",
119120
"karmaConfig": "karma.conf.js",
121+
"browsers": "ChromeHeadlessNoSandbox",
120122
"polyfills": []
121123
}
122124
},
@@ -158,6 +160,7 @@
158160
"options": {
159161
"tsConfig": "projects/scroll-header/tsconfig.spec.json",
160162
"karmaConfig": "karma.conf.js",
163+
"browsers": "ChromeHeadlessNoSandbox",
161164
"polyfills": []
162165
}
163166
},
@@ -199,6 +202,7 @@
199202
"options": {
200203
"tsConfig": "projects/scroll-strategies/tsconfig.spec.json",
201204
"karmaConfig": "karma.conf.js",
205+
"browsers": "ChromeHeadlessNoSandbox",
202206
"polyfills": []
203207
}
204208
},

karma.conf.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = function (config) {
3434
colors: true,
3535
logLevel: config.LOG_INFO,
3636
autoWatch: true,
37-
browsers: ['Chrome', 'ChromeHeadless', 'ChromeHeadlessCI', 'ChromeDebugging'],
37+
browsers: ['Chrome', 'ChromeHeadless', 'ChromeHeadlessCI', 'ChromeDebugging', 'ChromeHeadlessNoSandbox'],
3838
customLaunchers: {
3939
ChromeHeadlessCI: {
4040
base: 'ChromeHeadless',
@@ -44,6 +44,21 @@ module.exports = function (config) {
4444
base: 'Chrome',
4545
flags: ['--remote-debugging-port=29229'],
4646
},
47+
ChromeHeadlessNoSandbox: {
48+
base: 'ChromeHeadless',
49+
flags: [
50+
'--no-sandbox',
51+
'--disable-setuid-sandbox',
52+
'--disable-gpu',
53+
'--disable-dev-shm-usage',
54+
'--disable-web-security',
55+
'--headless',
56+
'--disable-extensions',
57+
'--disable-background-timer-throttling',
58+
'--disable-backgrounding-occluded-windows',
59+
'--disable-renderer-backgrounding'
60+
],
61+
},
4762
},
4863
singleRun: false,
4964
restartOnFileChange: true,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"build": "ng build demo",
1818
"watch": "ng build --watch --configuration development",
1919
"test": "ng test",
20+
"test:headless": "CHROME_BIN=/usr/bin/google-chrome ng test --watch=false",
2021
"cap": "npm run build -- --configuration production && npx cap copy",
2122
"fmt": "prettier --parser typescript --write \"./**/*.ts\" && prettier --parser angular --write \"./**/*.html\"",
2223
"prebuild:photo-editor": "ng build photo-editor --configuration=production",

test-headless.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
export CHROME_BIN=/usr/bin/google-chrome
3+
npm test -- --watch=false

0 commit comments

Comments
 (0)