mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: run tests in chrome headless local (#8651)
Runs local tests in Chrome Headless. This speeds up the tests and also ensures more test stability. On Windows there are a lot of pixel deviation failures because the tests seemed to be affected by the screen resolution or window frame. By running the tests headless, the Chrome launcher has more control about the rendering and pixel deviations like before won't happen anymore. It's still the same Chrome that runs, just that the screen is kind of emulated like in XVFB.
This commit is contained in:
committed by
tinayuangao
parent
1a383ced5e
commit
a0075fff4c
@@ -5,7 +5,7 @@
|
||||
* Target can be either: BS (Browserstack) | SL (Saucelabs) | TC (Travis CI) | null (To not run)
|
||||
*/
|
||||
const browserConfig = {
|
||||
'ChromeHeadless_CI': { unitTest: {target: 'TC', required: true }},
|
||||
'ChromeHeadlessCI': { unitTest: {target: 'TC', required: true }},
|
||||
'FirefoxHeadless': { unitTest: {target: 'TC', required: true }},
|
||||
'ChromeBeta': { unitTest: {target: null, required: false }},
|
||||
'FirefoxBeta': { unitTest: {target: null, required: false }},
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ module.exports = (config) => {
|
||||
browserDisconnectTimeout: 20000,
|
||||
browserNoActivityTimeout: 240000,
|
||||
captureTimeout: 120000,
|
||||
browsers: ['Chrome_1024x768'],
|
||||
browsers: ['ChromeHeadlessLocal'],
|
||||
|
||||
singleRun: false,
|
||||
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
{
|
||||
"ChromeHeadless_CI": {
|
||||
"ChromeHeadlessLocal": {
|
||||
"base": "ChromeHeadless",
|
||||
"flags": [
|
||||
"--window-size=1024,768"
|
||||
]
|
||||
},
|
||||
"Chrome_1024x768": {
|
||||
"base": "Chrome",
|
||||
"flags": [
|
||||
"--window-size=1024,768"
|
||||
]
|
||||
},
|
||||
"FirefoxHeadless": {
|
||||
"base": "Firefox",
|
||||
"flags": [
|
||||
"-headless"
|
||||
]
|
||||
},
|
||||
"ChromeHeadlessCI": {
|
||||
"base": "ChromeHeadlessLocal"
|
||||
},
|
||||
"SL_CHROME": {
|
||||
"base": "SauceLabs",
|
||||
"browserName": "chrome",
|
||||
|
||||
Reference in New Issue
Block a user