File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55const { SpecReporter } = require ( 'jasmine-spec-reporter' ) ;
66
7+ let nwBinary = 'nwjs/nw.exe' ;
8+ let driver = 'nwjs/chromedriver.exe' ;
9+
10+ if ( process . platform === 'linux' ) {
11+ nwBinary = 'nwjs/nw' ;
12+ driver = 'nwjs/chromedriver'
13+ }
14+ if ( process . platform === 'darwin' ) {
15+ nwBinary = 'nwjs.app/contents/MacOS/nwjs' ;
16+ driver = 'chromedriver' ;
17+ }
18+
19+ nwBinary = './node_modules/nw/' + nwBinary ;
20+ driver = '../node_modules/nw/' + driver ;
21+
722/**
823 * @type { import("protractor").Config }
924 */
@@ -12,21 +27,31 @@ exports.config = {
1227 specs : [
1328 './src/**/*.e2e-spec.ts'
1429 ] ,
30+ chromeDriver : driver ,
1531 capabilities : {
16- 'browserName' : 'chrome'
32+ browserName : 'chrome' ,
33+ chromeOptions : {
34+ binary : nwBinary
35+ }
1736 } ,
1837 directConnect : true ,
1938 baseUrl : 'http://localhost:4200/' ,
2039 framework : 'jasmine' ,
2140 jasmineNodeOpts : {
2241 showColors : true ,
2342 defaultTimeoutInterval : 30000 ,
24- print : function ( ) { }
43+ print : function ( ) { }
2544 } ,
26- onPrepare ( ) {
45+ onPrepare : function ( ) {
2746 require ( 'ts-node' ) . register ( {
2847 project : require ( 'path' ) . join ( __dirname , './tsconfig.json' )
2948 } ) ;
30- jasmine . getEnv ( ) . addReporter ( new SpecReporter ( { spec : { displayStacktrace : true } } ) ) ;
49+
50+ jasmine . getEnv ( )
51+ . addReporter ( new SpecReporter ( {
52+ spec : {
53+ displayStacktrace : true
54+ }
55+ } ) ) ;
3156 }
32- } ;
57+ } ;
You can’t perform that action at this time.
0 commit comments