1
1
import reducer from '../app/src/reducers/componentReducer' ;
2
- import { State , Action , Component , ChildElement } from '../app/src/interfaces/InterfacesNew' ;
2
+ // import { State, Action, Component, ChildElement } from '../app/src/interfaces/InterfacesNew';
3
3
4
4
import initialState from '../app/src/context/initialState' ;
5
5
@@ -8,10 +8,24 @@ const Application = require('spectron').Application;
8
8
const baseDir = path . join ( __dirname , '..' ) ;
9
9
const electronPath = path . join ( baseDir , 'node_modules' , '.bin' , 'electron' ) ;
10
10
11
+ const appArg = path . join ( baseDir , 'app' , 'electron' , 'main.js' ) ;
12
+ //const appArg = path.join(baseDir, 'app', 'electron');
13
+ console . log ( electronPath ) ;
14
+ console . log ( appArg ) ;
15
+
16
+ //const electronPath = '../node_modules/.bin/electron';
17
+ //const electronPath = require('electron');
18
+
11
19
const app = new Application ( {
12
20
path : electronPath ,
13
- args : [ '../app/electron/main.js' ]
21
+ args : [ appArg ] ,
22
+ chromeDriverArgs : [ '--no-proxy-server' ] ,
23
+ env : {
24
+ 'NO_PROXY' : '127.0.0.1,localhost'
25
+ }
14
26
} )
27
+
28
+ console . log ( app ) ;
15
29
// const testComponent: Component = {
16
30
// id: 2,
17
31
// name: "Test",
@@ -22,10 +36,11 @@ const app = new Application({
22
36
// }
23
37
24
38
describe ( 'Testing componentReducer functionality' , ( ) => {
25
- let state : State = initialState ;
39
+ let state = initialState ;
40
+
26
41
27
- beforeAll ( ( ) => {
28
- return app . start ( ) ;
42
+ beforeAll ( async ( ) => {
43
+ return await app . start ( ) ;
29
44
} )
30
45
31
46
afterAll ( ( ) => {
0 commit comments