@@ -5,9 +5,9 @@ require('ts-node').register({
55 project : path . join ( __dirname , '../e2e/' )
66} ) ;
77
8-
98const E2E_BASE_URL = process . env [ 'E2E_BASE_URL' ] || 'http://localhost:4200' ;
10- const config = {
9+
10+ exports . config = {
1111 useAllAngular2AppRoots : true ,
1212 specs : [ path . join ( __dirname , '../e2e/**/*.spec.ts' ) ] ,
1313 baseUrl : E2E_BASE_URL ,
@@ -27,34 +27,23 @@ const config = {
2727 // Exclude mat-menu elements because those are empty if not active.
2828 { id : 'aria-required-children' , selector : '*:not(mat-menu)' } ,
2929
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.
3131 { id : 'color-contrast' , enabled : false } ,
3232 ]
3333 }
34- ]
35- } ;
34+ ] ,
3635
37- if ( process . env [ 'TRAVIS' ] ) {
38- const key = require ( '../scripts/saucelabs/sauce_config' ) ;
36+ capabilities : {
37+ browserName : 'chrome' ,
3938
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+ } ,
4844
4945 // 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