@@ -5,9 +5,9 @@ require('ts-node').register({
5
5
project : path . join ( __dirname , '../e2e/' )
6
6
} ) ;
7
7
8
-
9
8
const E2E_BASE_URL = process . env [ 'E2E_BASE_URL' ] || 'http://localhost:4200' ;
10
- const config = {
9
+
10
+ exports . config = {
11
11
useAllAngular2AppRoots : true ,
12
12
specs : [ path . join ( __dirname , '../e2e/**/*.spec.ts' ) ] ,
13
13
baseUrl : E2E_BASE_URL ,
@@ -27,34 +27,23 @@ const config = {
27
27
// Exclude mat-menu elements because those are empty if not active.
28
28
{ id : 'aria-required-children' , selector : '*:not(mat-menu)' } ,
29
29
30
- // Disable color constrast checks since the final colors will vary based on the theme.
30
+ // Disable color contrast checks since the final colors will vary based on the theme.
31
31
{ id : 'color-contrast' , enabled : false } ,
32
32
]
33
33
}
34
- ]
35
- } ;
34
+ ] ,
36
35
37
- if ( process . env [ 'TRAVIS' ] ) {
38
- const key = require ( '../scripts/saucelabs/sauce_config' ) ;
36
+ capabilities : {
37
+ browserName : 'chrome' ,
39
38
40
- config . sauceUser = process . env [ 'SAUCE_USERNAME' ] ;
41
- config . sauceKey = key ;
42
- config . capabilities = {
43
- 'browserName' : 'chrome' ,
44
- 'version' : 'latest' ,
45
- 'tunnel-identifier' : process . env [ 'TRAVIS_JOB_ID' ] ,
46
- 'build' : process . env [ 'TRAVIS_JOB_ID' ] ,
47
- 'name' : 'Material E2E Tests' ,
39
+ chromeOptions : {
40
+ // Inside of Travis, we need to specify `--no-sandbox` because otherwise Chrome cannot
41
+ // be launched properly due to insufficient permissions in a non-sudo environment.
42
+ args : process . env [ 'TRAVIS' ] ? [ '--no-sandbox' ] : [ ] ,
43
+ } ,
48
44
49
45
// Enables concurrent testing in the Webdriver. Currently runs five e2e files in parallel.
50
- 'maxInstances' : 5 ,
51
- 'shardTestFiles' : true ,
52
-
53
- // By default Saucelabs tries to record the whole e2e run. This can slow down the builds.
54
- 'recordVideo' : false ,
55
- 'recordScreenshots' : false
56
- } ;
57
- }
58
-
59
-
60
- exports . config = config ;
46
+ shardTestFiles : true ,
47
+ maxInstances : 5 ,
48
+ }
49
+ } ;
0 commit comments