mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: fix small browser test coverage (#11970)
* No longer just runs the tests against the first browser of a test platform (travis, saucelabs, browserstack) * Stability is more valuable than speed (runs sequentially on CI now) * Update Saucelabs Connect * Remove unused spec reporter * Update from Edge 14 to Edge 17 * Fix pixel deviations in Edge 17
This commit is contained in:
committed by
Jeremy Elbourn
parent
de107b7e23
commit
fdd70823cf
Generated
+2047
-1549
File diff suppressed because it is too large
Load Diff
+1
-3
@@ -100,16 +100,14 @@
|
||||
"image-diff": "^1.6.3",
|
||||
"jasmine-core": "2.8.0",
|
||||
"jsonwebtoken": "^7.4.1",
|
||||
"karma": "^1.7.1",
|
||||
"karma": "^2.0.4",
|
||||
"karma-browserstack-launcher": "^1.3.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-coverage": "^1.1.1",
|
||||
"karma-firefox-launcher": "^1.0.1",
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-sauce-launcher": "^1.2.0",
|
||||
"karma-sharding": "^4.4.0",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-spec-reporter": "^0.0.32",
|
||||
"madge": "^2.2.0",
|
||||
"magic-string": "^0.22.4",
|
||||
"minimatch": "^3.0.4",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
TUNNEL_FILE="sc-4.4.10-linux.tar.gz"
|
||||
TUNNEL_FILE="sc-4.4.12-linux.tar.gz"
|
||||
TUNNEL_URL="https://saucelabs.com/downloads/${TUNNEL_FILE}"
|
||||
TUNNEL_DIR="/tmp/saucelabs-connect"
|
||||
|
||||
|
||||
@@ -726,8 +726,16 @@ describe('CdkTable', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
expect(element.style[d])
|
||||
.toBe(directions[d], `Expected direction ${d} to be ${directions[d]}`);
|
||||
const expectationMessage = `Expected direction ${d} to be ${directions[d]}`;
|
||||
|
||||
// If the direction contains `px`, we parse the number to be able to avoid deviations
|
||||
// caused by individual browsers.
|
||||
if (directions[d].includes('px')) {
|
||||
expect(Math.round(parseInt(element.style[d])))
|
||||
.toBe(Math.round(parseInt(directions[d])), expectationMessage);
|
||||
} else {
|
||||
expect(element.style[d]).toBe(directions[d], expectationMessage);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3361,8 +3361,14 @@ describe('MatSelect', () => {
|
||||
fixture.componentInstance.heightBelow = 400;
|
||||
fixture.detectChanges();
|
||||
|
||||
// Scroll the select into view
|
||||
setScrollTop(1700);
|
||||
// Space that is needed in order to show the menu below the trigger.
|
||||
// 256 (height of the menu overlay) - 45 (estimated height of the trigger)
|
||||
const requiredSpaceBelow = 256 - 45;
|
||||
|
||||
// Scroll the select into view. Make sure that there is enough space for the menu
|
||||
// to open below the trigger (depending on the screen resolution)
|
||||
setScrollTop(2000 - requiredSpaceBelow);
|
||||
|
||||
|
||||
// In the iOS simulator (BrowserStack & SauceLabs), adding the content to the
|
||||
// body causes karma's iframe for the test to stretch to fit that content once we attempt to
|
||||
@@ -3389,8 +3395,15 @@ describe('MatSelect', () => {
|
||||
fixture.detectChanges();
|
||||
flush();
|
||||
|
||||
// Scroll the select into view
|
||||
setScrollTop(1700);
|
||||
// Space that is needed in order to show the menu below the trigger.
|
||||
// 256 (height of the menu overlay) - 45 (estimated height of the trigger)
|
||||
// Even though there might be less options displayed below the trigger because the
|
||||
// selected option is the fourth item, we want to make sure we have enough space here.
|
||||
const requiredSpaceBelow = 256 - 45;
|
||||
|
||||
// Scroll the select into view. Make sure that there is enough space for the menu
|
||||
// to open below the trigger (depending on the screen resolution)
|
||||
setScrollTop(2000 - requiredSpaceBelow);
|
||||
|
||||
// In the iOS simulator (BrowserStack & SauceLabs), adding the content to the
|
||||
// body causes karma's iframe for the test to stretch to fit that content once we attempt
|
||||
|
||||
@@ -9,12 +9,12 @@ const browserConfig = {
|
||||
'FirefoxHeadless': { unitTest: {target: 'TC', required: true }},
|
||||
'ChromeBeta': { unitTest: {target: null, required: false }},
|
||||
'FirefoxBeta': { unitTest: {target: null, required: false }},
|
||||
'ChromeDev': { unitTest: {target: null, required: true }},
|
||||
'FirefoxDev': { unitTest: {target: null, required: true }},
|
||||
'ChromeDev': { unitTest: {target: null, required: false }},
|
||||
'FirefoxDev': { unitTest: {target: null, required: false }},
|
||||
'IE9': { unitTest: {target: null, required: false }},
|
||||
'IE10': { unitTest: {target: null, required: true }},
|
||||
'IE10': { unitTest: {target: null, required: false }},
|
||||
'IE11': { unitTest: {target: null, required: false }},
|
||||
'Edge': { unitTest: {target: 'SL', required: true }},
|
||||
'Edge': { unitTest: {target: 'BS', required: true }},
|
||||
'Android4.1': { unitTest: {target: null, required: false }},
|
||||
'Android4.2': { unitTest: {target: null, required: false }},
|
||||
'Android4.3': { unitTest: {target: null, required: false }},
|
||||
@@ -27,7 +27,10 @@ const browserConfig = {
|
||||
'iOS7': { unitTest: {target: null, required: false }},
|
||||
'iOS8': { unitTest: {target: null, required: false }},
|
||||
'iOS9': { unitTest: {target: null, required: false }},
|
||||
'iOS10': { unitTest: {target: 'BS', required: true }},
|
||||
'iOS10': { unitTest: {target: null, required: false }},
|
||||
// Don't use Browserstack until our open-source license includes automate testing on
|
||||
// mobile devices. For now, we need to use Saucelabs to keep our coverage.
|
||||
'iOS11': { unitTest: {target: 'SL', required: true }},
|
||||
'WindowsPhone': { unitTest: {target: null, required: false }}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
// Configure the base path and map the different node packages.
|
||||
System.config({
|
||||
baseURL: '/base',
|
||||
paths: {
|
||||
'node:*': 'node_modules/*'
|
||||
},
|
||||
map: {
|
||||
'rxjs': 'node:rxjs',
|
||||
'tslib': 'node:tslib/tslib.js',
|
||||
'moment': 'node:moment/min/moment-with-locales.min.js',
|
||||
|
||||
// Angular specific mappings.
|
||||
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
|
||||
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.min.js',
|
||||
'@angular/common': 'node:@angular/common/bundles/common.umd.min.js',
|
||||
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.min.js',
|
||||
'@angular/common/http': 'node:@angular/common/bundles/common-http.umd.min.js',
|
||||
'@angular/common/http/testing': 'node:@angular/common/bundles/common-http-testing.umd.min.js',
|
||||
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.min.js',
|
||||
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.min.js',
|
||||
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.min.js',
|
||||
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.min.js',
|
||||
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.min.js',
|
||||
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.min.js',
|
||||
'@angular/platform-browser/animations':
|
||||
'node:@angular/platform-browser/bundles/platform-browser-animations.umd.min.js',
|
||||
'@angular/platform-browser':
|
||||
'node:@angular/platform-browser/bundles/platform-browser.umd.min.js',
|
||||
'@angular/platform-browser/testing':
|
||||
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.min.js',
|
||||
'@angular/platform-browser-dynamic':
|
||||
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.min.js',
|
||||
'@angular/platform-browser-dynamic/testing':
|
||||
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.min.js',
|
||||
|
||||
// Path mappings for local packages that can be imported inside of tests.
|
||||
'@angular/material': 'dist/packages/material/index.js',
|
||||
'@angular/material-experimental': 'dist/packages/material-experimental/index.js',
|
||||
'@angular/cdk-experimental': 'dist/packages/cdk-experimental/index.js',
|
||||
|
||||
'@angular/cdk': 'dist/packages/cdk/index.js',
|
||||
'@angular/cdk/a11y': 'dist/packages/cdk/a11y/index.js',
|
||||
'@angular/cdk/accordion': 'dist/packages/cdk/accordion/index.js',
|
||||
'@angular/cdk/bidi': 'dist/packages/cdk/bidi/index.js',
|
||||
'@angular/cdk/coercion': 'dist/packages/cdk/coercion/index.js',
|
||||
'@angular/cdk/collections': 'dist/packages/cdk/collections/index.js',
|
||||
'@angular/cdk/keycodes': 'dist/packages/cdk/keycodes/index.js',
|
||||
'@angular/cdk/layout': 'dist/packages/cdk/layout/index.js',
|
||||
'@angular/cdk/observers': 'dist/packages/cdk/observers/index.js',
|
||||
'@angular/cdk/overlay': 'dist/packages/cdk/overlay/index.js',
|
||||
'@angular/cdk/platform': 'dist/packages/cdk/platform/index.js',
|
||||
'@angular/cdk/portal': 'dist/packages/cdk/portal/index.js',
|
||||
'@angular/cdk/scrolling': 'dist/packages/cdk/scrolling/index.js',
|
||||
'@angular/cdk/stepper': 'dist/packages/cdk/stepper/index.js',
|
||||
'@angular/cdk/table': 'dist/packages/cdk/table/index.js',
|
||||
'@angular/cdk/testing': 'dist/packages/cdk/testing/index.js',
|
||||
'@angular/cdk/text-field': 'dist/packages/cdk/text-field/index.js',
|
||||
'@angular/cdk/tree': 'dist/packages/cdk/tree/index.js',
|
||||
|
||||
'@angular/cdk-experimental/scrolling': 'dist/packages/cdk-experimental/scrolling/index.js',
|
||||
'@angular/cdk-experimental/dialog': 'dist/packages/cdk-experimental/dialog/index.js',
|
||||
'@angular/cdk-experimental/drag-drop':
|
||||
'dist/packages/cdk-experimental/drag-drop/index.js',
|
||||
|
||||
'@angular/material/autocomplete': 'dist/packages/material/autocomplete/index.js',
|
||||
'@angular/material/badge': 'dist/packages/material/badge/index.js',
|
||||
'@angular/material/bottom-sheet': 'dist/packages/material/bottom-sheet/index.js',
|
||||
'@angular/material/button': 'dist/packages/material/button/index.js',
|
||||
'@angular/material/button-toggle': 'dist/packages/material/button-toggle/index.js',
|
||||
'@angular/material/card': 'dist/packages/material/card/index.js',
|
||||
'@angular/material/checkbox': 'dist/packages/material/checkbox/index.js',
|
||||
'@angular/material/chips': 'dist/packages/material/chips/index.js',
|
||||
'@angular/material/core': 'dist/packages/material/core/index.js',
|
||||
'@angular/material/datepicker': 'dist/packages/material/datepicker/index.js',
|
||||
'@angular/material/dialog': 'dist/packages/material/dialog/index.js',
|
||||
'@angular/material/divider': 'dist/packages/material/divider/index.js',
|
||||
'@angular/material/expansion': 'dist/packages/material/expansion/index.js',
|
||||
'@angular/material/form-field': 'dist/packages/material/form-field/index.js',
|
||||
'@angular/material/grid-list': 'dist/packages/material/grid-list/index.js',
|
||||
'@angular/material/icon': 'dist/packages/material/icon/index.js',
|
||||
'@angular/material/input': 'dist/packages/material/input/index.js',
|
||||
'@angular/material/list': 'dist/packages/material/list/index.js',
|
||||
'@angular/material/menu': 'dist/packages/material/menu/index.js',
|
||||
'@angular/material/paginator': 'dist/packages/material/paginator/index.js',
|
||||
'@angular/material/progress-bar': 'dist/packages/material/progress-bar/index.js',
|
||||
'@angular/material/progress-spinner': 'dist/packages/material/progress-spinner/index.js',
|
||||
'@angular/material/radio': 'dist/packages/material/radio/index.js',
|
||||
'@angular/material/select': 'dist/packages/material/select/index.js',
|
||||
'@angular/material/sidenav': 'dist/packages/material/sidenav/index.js',
|
||||
'@angular/material/slide-toggle': 'dist/packages/material/slide-toggle/index.js',
|
||||
'@angular/material/slider': 'dist/packages/material/slider/index.js',
|
||||
'@angular/material/snack-bar': 'dist/packages/material/snack-bar/index.js',
|
||||
'@angular/material/sort': 'dist/packages/material/sort/index.js',
|
||||
'@angular/material/stepper': 'dist/packages/material/stepper/index.js',
|
||||
'@angular/material/table': 'dist/packages/material/table/index.js',
|
||||
'@angular/material/tabs': 'dist/packages/material/tabs/index.js',
|
||||
'@angular/material/toolbar': 'dist/packages/material/toolbar/index.js',
|
||||
'@angular/material/tooltip': 'dist/packages/material/tooltip/index.js',
|
||||
'@angular/material/tree': 'dist/packages/material/tree/index.js',
|
||||
},
|
||||
packages: {
|
||||
// Thirdparty barrels.
|
||||
'rxjs': {main: 'index'},
|
||||
'rxjs/operators': {main: 'index'},
|
||||
|
||||
// Set the default extension for the root package, because otherwise the demo-app can't
|
||||
// be built within the production mode. Due to missing file extensions.
|
||||
'.': {
|
||||
defaultExtension: 'js'
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -8,123 +8,8 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
||||
|
||||
__karma__.loaded = function () {};
|
||||
|
||||
var baseDir = '/base';
|
||||
var specFiles = Object.keys(window.__karma__.files).filter(isMaterialSpecFile);
|
||||
|
||||
// Configure the base path and map the different node packages.
|
||||
System.config({
|
||||
baseURL: baseDir,
|
||||
paths: {
|
||||
'node:*': 'node_modules/*'
|
||||
},
|
||||
map: {
|
||||
'rxjs': 'node:rxjs',
|
||||
'main': 'main.js',
|
||||
'tslib': 'node:tslib/tslib.js',
|
||||
'moment': 'node:moment/min/moment-with-locales.min.js',
|
||||
|
||||
// Angular specific mappings.
|
||||
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
|
||||
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.js',
|
||||
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
|
||||
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.js',
|
||||
'@angular/common/http': 'node:@angular/common/bundles/common-http.umd.js',
|
||||
'@angular/common/http/testing': 'node:@angular/common/bundles/common-http-testing.umd.js',
|
||||
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
|
||||
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
|
||||
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.js',
|
||||
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
|
||||
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
|
||||
'@angular/platform-browser/animations':
|
||||
'node:@angular/platform-browser/bundles/platform-browser-animations.umd',
|
||||
'@angular/platform-browser':
|
||||
'node:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser/testing':
|
||||
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||
'@angular/platform-browser-dynamic':
|
||||
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'@angular/platform-browser-dynamic/testing':
|
||||
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||
|
||||
// Path mappings for local packages that can be imported inside of tests.
|
||||
'@angular/material': 'dist/packages/material/index.js',
|
||||
'@angular/material-experimental': 'dist/packages/material-experimental/index.js',
|
||||
'@angular/cdk-experimental': 'dist/packages/cdk-experimental/index.js',
|
||||
|
||||
'@angular/cdk': 'dist/packages/cdk/index.js',
|
||||
'@angular/cdk/a11y': 'dist/packages/cdk/a11y/index.js',
|
||||
'@angular/cdk/accordion': 'dist/packages/cdk/accordion/index.js',
|
||||
'@angular/cdk/bidi': 'dist/packages/cdk/bidi/index.js',
|
||||
'@angular/cdk/coercion': 'dist/packages/cdk/coercion/index.js',
|
||||
'@angular/cdk/collections': 'dist/packages/cdk/collections/index.js',
|
||||
'@angular/cdk/keycodes': 'dist/packages/cdk/keycodes/index.js',
|
||||
'@angular/cdk/layout': 'dist/packages/cdk/layout/index.js',
|
||||
'@angular/cdk/observers': 'dist/packages/cdk/observers/index.js',
|
||||
'@angular/cdk/overlay': 'dist/packages/cdk/overlay/index.js',
|
||||
'@angular/cdk/platform': 'dist/packages/cdk/platform/index.js',
|
||||
'@angular/cdk/portal': 'dist/packages/cdk/portal/index.js',
|
||||
'@angular/cdk/scrolling': 'dist/packages/cdk/scrolling/index.js',
|
||||
'@angular/cdk/stepper': 'dist/packages/cdk/stepper/index.js',
|
||||
'@angular/cdk/table': 'dist/packages/cdk/table/index.js',
|
||||
'@angular/cdk/testing': 'dist/packages/cdk/testing/index.js',
|
||||
'@angular/cdk/text-field': 'dist/packages/cdk/text-field/index.js',
|
||||
'@angular/cdk/tree': 'dist/packages/cdk/tree/index.js',
|
||||
|
||||
'@angular/cdk-experimental/scrolling': 'dist/packages/cdk-experimental/scrolling/index.js',
|
||||
'@angular/cdk-experimental/dialog': 'dist/packages/cdk-experimental/dialog/index.js',
|
||||
'@angular/cdk-experimental/drag-drop':
|
||||
'dist/packages/cdk-experimental/drag-drop/index.js',
|
||||
|
||||
'@angular/material/autocomplete': 'dist/packages/material/autocomplete/index.js',
|
||||
'@angular/material/badge': 'dist/packages/material/badge/index.js',
|
||||
'@angular/material/bottom-sheet': 'dist/packages/material/bottom-sheet/index.js',
|
||||
'@angular/material/button': 'dist/packages/material/button/index.js',
|
||||
'@angular/material/button-toggle': 'dist/packages/material/button-toggle/index.js',
|
||||
'@angular/material/card': 'dist/packages/material/card/index.js',
|
||||
'@angular/material/checkbox': 'dist/packages/material/checkbox/index.js',
|
||||
'@angular/material/chips': 'dist/packages/material/chips/index.js',
|
||||
'@angular/material/core': 'dist/packages/material/core/index.js',
|
||||
'@angular/material/datepicker': 'dist/packages/material/datepicker/index.js',
|
||||
'@angular/material/dialog': 'dist/packages/material/dialog/index.js',
|
||||
'@angular/material/divider': 'dist/packages/material/divider/index.js',
|
||||
'@angular/material/expansion': 'dist/packages/material/expansion/index.js',
|
||||
'@angular/material/form-field': 'dist/packages/material/form-field/index.js',
|
||||
'@angular/material/grid-list': 'dist/packages/material/grid-list/index.js',
|
||||
'@angular/material/icon': 'dist/packages/material/icon/index.js',
|
||||
'@angular/material/input': 'dist/packages/material/input/index.js',
|
||||
'@angular/material/list': 'dist/packages/material/list/index.js',
|
||||
'@angular/material/menu': 'dist/packages/material/menu/index.js',
|
||||
'@angular/material/paginator': 'dist/packages/material/paginator/index.js',
|
||||
'@angular/material/progress-bar': 'dist/packages/material/progress-bar/index.js',
|
||||
'@angular/material/progress-spinner': 'dist/packages/material/progress-spinner/index.js',
|
||||
'@angular/material/radio': 'dist/packages/material/radio/index.js',
|
||||
'@angular/material/select': 'dist/packages/material/select/index.js',
|
||||
'@angular/material/sidenav': 'dist/packages/material/sidenav/index.js',
|
||||
'@angular/material/slide-toggle': 'dist/packages/material/slide-toggle/index.js',
|
||||
'@angular/material/slider': 'dist/packages/material/slider/index.js',
|
||||
'@angular/material/snack-bar': 'dist/packages/material/snack-bar/index.js',
|
||||
'@angular/material/sort': 'dist/packages/material/sort/index.js',
|
||||
'@angular/material/stepper': 'dist/packages/material/stepper/index.js',
|
||||
'@angular/material/table': 'dist/packages/material/table/index.js',
|
||||
'@angular/material/tabs': 'dist/packages/material/tabs/index.js',
|
||||
'@angular/material/toolbar': 'dist/packages/material/toolbar/index.js',
|
||||
'@angular/material/tooltip': 'dist/packages/material/tooltip/index.js',
|
||||
'@angular/material/tree': 'dist/packages/material/tree/index.js',
|
||||
},
|
||||
packages: {
|
||||
// Thirdparty barrels.
|
||||
'rxjs': {main: 'index'},
|
||||
'rxjs/operators': {main: 'index'},
|
||||
|
||||
// Set the default extension for the root package, because otherwise the demo-app can't
|
||||
// be built within the production mode. Due to missing file extensions.
|
||||
'.': {
|
||||
defaultExtension: 'js'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Configure the Angular test bed and run all specs once configured.
|
||||
configureTestBed()
|
||||
.then(runMaterialSpecs)
|
||||
|
||||
+22
-26
@@ -5,7 +5,7 @@ module.exports = (config) => {
|
||||
|
||||
config.set({
|
||||
basePath: path.join(__dirname, '..'),
|
||||
frameworks: ['sharding', 'jasmine'],
|
||||
frameworks: ['jasmine'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-browserstack-launcher'),
|
||||
@@ -14,27 +14,25 @@ module.exports = (config) => {
|
||||
require('karma-firefox-launcher'),
|
||||
require('karma-sourcemap-loader'),
|
||||
require('karma-coverage'),
|
||||
require('karma-spec-reporter'),
|
||||
require('karma-sharding'),
|
||||
],
|
||||
files: [
|
||||
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/core-js/client/core.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/tslib/tslib.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/proxy.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/systemjs/dist/system.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/zone.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/proxy.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/sync-test.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/jasmine-patch.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/jasmine-patch.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/async-test.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/zone.js/dist/fake-async-test.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/hammerjs/hammer.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/hammerjs/hammer.min.js.map', included: false, watched: false},
|
||||
{pattern: 'node_modules/moment/min/moment-with-locales.min.js', included: true, watched: false},
|
||||
|
||||
// Include all Angular dependencies
|
||||
{pattern: 'node_modules/@angular/**/*', included: false, watched: false},
|
||||
{pattern: 'node_modules/rxjs/**/*', included: false, watched: false},
|
||||
|
||||
{pattern: 'test/karma-system-config.js', included: true, watched: false},
|
||||
{pattern: 'test/karma-test-shim.js', included: true, watched: false},
|
||||
|
||||
// Include a Material theme in the test suite.
|
||||
@@ -60,15 +58,8 @@ module.exports = (config) => {
|
||||
subdir: '.'
|
||||
},
|
||||
|
||||
// TODO(josephperrott): Determine how to properly disable extra output on ci.
|
||||
specReporter: {
|
||||
maxLogLines: Infinity, // Log out the entire stack trace on errors and failures.
|
||||
suppressSkipped: true,
|
||||
showSpecTiming: true,
|
||||
},
|
||||
|
||||
sauceLabs: {
|
||||
testName: 'material2',
|
||||
testName: 'Angular Material Unit Tests',
|
||||
startConnect: false,
|
||||
recordVideo: false,
|
||||
recordScreenshots: false,
|
||||
@@ -78,11 +69,10 @@ module.exports = (config) => {
|
||||
},
|
||||
|
||||
browserStack: {
|
||||
project: 'material2',
|
||||
project: 'Angular Material Unit Tests',
|
||||
startTunnel: false,
|
||||
retryLimit: 1,
|
||||
retryLimit: 3,
|
||||
timeout: 1800,
|
||||
pollingTimeout: 20000,
|
||||
video: false,
|
||||
},
|
||||
|
||||
@@ -90,10 +80,13 @@ module.exports = (config) => {
|
||||
browserDisconnectTolerance: 3,
|
||||
browserNoActivityTimeout: 300000,
|
||||
captureTimeout: 180000,
|
||||
browsers: ['ChromeHeadlessLocal'],
|
||||
|
||||
browsers: ['ChromeHeadlessLocal'],
|
||||
singleRun: false,
|
||||
|
||||
// Try Websocket for a faster transmission first. Fallback to polling if necessary.
|
||||
transports: ['websocket', 'polling'],
|
||||
|
||||
browserConsoleLogOptions: {
|
||||
terminal: true,
|
||||
level: 'log'
|
||||
@@ -104,7 +97,7 @@ module.exports = (config) => {
|
||||
// TODO(jelbourn): re-enable random test order once we can de-flake existing issues.
|
||||
random: false
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
if (process.env['TRAVIS']) {
|
||||
@@ -115,8 +108,6 @@ module.exports = (config) => {
|
||||
|
||||
config.preprocessors['dist/packages/**/!(*+(.|-)spec).js'] = ['coverage'];
|
||||
config.reporters.push('coverage');
|
||||
// Hide passed tests from logs while on travis.
|
||||
config.specReporter.suppressPassed = true;
|
||||
}
|
||||
|
||||
// The MODE variable is the indicator of what row in the test matrix we're running.
|
||||
@@ -135,7 +126,12 @@ module.exports = (config) => {
|
||||
throw new Error(`Platform "${platform}" unknown, but Travis specified. Exiting.`);
|
||||
}
|
||||
|
||||
// Set the browser list to be the same browser 3 times, to shard tests into three instances.
|
||||
config.browsers = (new Array(3)).fill(platformMap[platform][target.toLowerCase()][0]);
|
||||
if (platform !== 'travis') {
|
||||
// To guarantee a better stability for tests running on external browsers, we disable
|
||||
// concurrency. Stability is compared to speed more important.
|
||||
config.concurrency = 1;
|
||||
}
|
||||
|
||||
config.browsers = platformMap[platform][target.toLowerCase()];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Load ts-node to be able to execute TypeScript files with protractor.
|
||||
|
||||
@@ -90,6 +90,12 @@
|
||||
"platform": "OS X 10.10",
|
||||
"version": "9.1"
|
||||
},
|
||||
"SL_IOS11": {
|
||||
"base": "SauceLabs",
|
||||
"browserName": "iphone",
|
||||
"platform": "Mac 10.12",
|
||||
"version": "11.2"
|
||||
},
|
||||
"SL_IE9": {
|
||||
"base": "SauceLabs",
|
||||
"browserName": "internet explorer",
|
||||
@@ -112,7 +118,7 @@
|
||||
"base": "SauceLabs",
|
||||
"browserName": "microsoftedge",
|
||||
"platform": "Windows 10",
|
||||
"version": "14"
|
||||
"version": "17"
|
||||
},
|
||||
"SL_ANDROID4.1": {
|
||||
"base": "SauceLabs",
|
||||
@@ -186,6 +192,7 @@
|
||||
"device": "iPhone 5S",
|
||||
"os": "ios",
|
||||
"os_version": "7.0",
|
||||
"real_mobile": true,
|
||||
"resolution": "1024x768"
|
||||
},
|
||||
"BS_IOS8": {
|
||||
@@ -193,6 +200,7 @@
|
||||
"device": "iPhone 6",
|
||||
"os": "ios",
|
||||
"os_version": "8.3",
|
||||
"real_mobile": true,
|
||||
"resolution": "1024x768"
|
||||
},
|
||||
"BS_IOS9": {
|
||||
@@ -200,14 +208,23 @@
|
||||
"device": "iPhone 6S",
|
||||
"os": "ios",
|
||||
"os_version": "9.0",
|
||||
"real_mobile": true,
|
||||
"resolution": "1024x768"
|
||||
},
|
||||
"BS_IOS10": {
|
||||
"base": "BrowserStack",
|
||||
"device": "iPhone 7",
|
||||
"os": "ios",
|
||||
"real_mobile": true,
|
||||
"os_version": "10.0"
|
||||
},
|
||||
"BS_IOS11": {
|
||||
"base": "BrowserStack",
|
||||
"device": "iPhone 8",
|
||||
"os": "ios",
|
||||
"os_version": "11.0",
|
||||
"real_mobile": true
|
||||
},
|
||||
"BS_IE9": {
|
||||
"base": "BrowserStack",
|
||||
"browser": "ie",
|
||||
@@ -231,7 +248,8 @@
|
||||
},
|
||||
"BS_EDGE": {
|
||||
"base": "BrowserStack",
|
||||
"browser": "edge",
|
||||
"browser": "Edge",
|
||||
"browser_version": "17.0",
|
||||
"os": "Windows",
|
||||
"os_version": "10"
|
||||
},
|
||||
@@ -239,36 +257,42 @@
|
||||
"base": "BrowserStack",
|
||||
"device": "Nokia Lumia 930",
|
||||
"os": "winphone",
|
||||
"real_mobile": true,
|
||||
"os_version": "8.1"
|
||||
},
|
||||
"BS_ANDROID5": {
|
||||
"base": "BrowserStack",
|
||||
"device": "Google Nexus 5",
|
||||
"os": "android",
|
||||
"real_mobile": true,
|
||||
"os_version": "5.0"
|
||||
},
|
||||
"BS_ANDROID4.4": {
|
||||
"base": "BrowserStack",
|
||||
"device": "HTC One M8",
|
||||
"os": "android",
|
||||
"real_mobile": true,
|
||||
"os_version": "4.4"
|
||||
},
|
||||
"BS_ANDROID4.3": {
|
||||
"base": "BrowserStack",
|
||||
"device": "Samsung Galaxy S4",
|
||||
"os": "android",
|
||||
"real_mobile": true,
|
||||
"os_version": "4.3"
|
||||
},
|
||||
"BS_ANDROID4.2": {
|
||||
"base": "BrowserStack",
|
||||
"device": "Google Nexus 4",
|
||||
"os": "android",
|
||||
"real_mobile": true,
|
||||
"os_version": "4.2"
|
||||
},
|
||||
"BS_ANDROID4.1": {
|
||||
"base": "BrowserStack",
|
||||
"device": "Google Nexus 7",
|
||||
"os": "android",
|
||||
"real_mobile": true,
|
||||
"os_version": "4.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user