File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 2
2
"src_folders" : [
3
3
" tests/nightwatch"
4
4
],
5
+ "globals_path" : " tests/globals" ,
5
6
"webdriver" : {
6
7
"start_process" : true ,
7
8
"server_path" : " node_modules/.bin/chromedriver" ,
Original file line number Diff line number Diff line change @@ -12,13 +12,23 @@ const DOM_TESTING_LIBRARY_UMD_PATH = path.join(
12
12
const DOM_TESTING_LIBRARY_UMD = fs . readFileSync ( DOM_TESTING_LIBRARY_UMD_PATH ) . toString ( )
13
13
const SIMMERJS = fs . readFileSync ( require . resolve ( 'simmerjs/dist/simmer.js' ) ) . toString ( ) ;
14
14
15
+ let _config = null ;
16
+
15
17
function injectNWTL ( browser ) {
16
- browser
17
- . execute ( DOM_TESTING_LIBRARY_UMD )
18
- browser . execute ( SIMMERJS )
18
+ browser . execute ( DOM_TESTING_LIBRARY_UMD ) ;
19
+
20
+ browser . execute ( SIMMERJS ) ;
21
+
22
+ if ( _config ) {
23
+ // eslint-disable-next-line no-shadow
24
+ browser . execute ( function ( _config ) {
25
+ window . TestingLibraryDom . configure ( _config ) ;
26
+ } , [ _config ] )
27
+ }
19
28
20
29
}
21
30
31
+
22
32
module . exports . getQueriesFrom = ( browser ) => {
23
33
const queries = { } ;
24
34
Object . keys ( baseQueries ) . forEach ( queryName => {
@@ -82,4 +92,8 @@ module.exports.getQueriesFrom = (browser) => {
82
92
} ) ;
83
93
84
94
return queries ;
95
+ }
96
+
97
+ module . exports . configure = ( config ) => {
98
+ _config = config ;
85
99
}
Original file line number Diff line number Diff line change @@ -2,11 +2,6 @@ const { getQueriesFrom } = require('../../src');
2
2
3
3
module . exports = {
4
4
5
- beforeEach ( browser ) {
6
-
7
- browser
8
- . url ( 'http://localhost:13370' )
9
- } ,
10
5
11
6
async 'Button click works' ( browser ) {
12
7
const { getByText } = getQueriesFrom ( browser ) ;
You can’t perform that action at this time.
0 commit comments