File tree Expand file tree Collapse file tree 5 files changed +26
-89
lines changed Expand file tree Collapse file tree 5 files changed +26
-89
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" : " src/globals" ,
6
5
"webdriver" : {
7
6
"start_process" : true ,
8
7
"server_path" : " node_modules/.bin/chromedriver" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+
2
+ const path = require ( 'path' ) ;
3
+ const fs = require ( 'fs' ) ;
1
4
const { queries : baseQueries } = require ( '@testing-library/dom' ) ;
5
+ // import { queries } from '@testing-library/dom'
6
+
7
+ const DOM_TESTING_LIBRARY_UMD_PATH = path . join (
8
+ require . resolve ( '@testing-library/dom' ) ,
9
+ '../../' ,
10
+ 'dist/@testing-library/dom.umd.js' ,
11
+ )
12
+ const DOM_TESTING_LIBRARY_UMD = fs . readFileSync ( DOM_TESTING_LIBRARY_UMD_PATH ) . toString ( )
13
+ const SIMMERJS = fs . readFileSync ( require . resolve ( 'simmerjs/dist/simmer.js' ) ) . toString ( ) ;
14
+
15
+ function injectNWTL ( browser ) {
16
+ browser
17
+ . execute ( DOM_TESTING_LIBRARY_UMD )
18
+ browser . execute ( SIMMERJS )
19
+
20
+ }
2
21
3
22
module . exports . getQueriesFrom = ( browser ) => {
4
23
const queries = { } ;
@@ -10,6 +29,8 @@ module.exports.getQueriesFrom = (browser) => {
10
29
}
11
30
return arg ;
12
31
} )
32
+
33
+ injectNWTL ( browser )
13
34
// eslint-disable-next-line no-shadow
14
35
browser . execute ( function ( queryName , ...args ) {
15
36
try {
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ const { getQueriesFrom } = require('../../src');
2
2
3
3
module . exports = {
4
4
5
+ beforeEach ( browser ) {
6
+
7
+ browser
8
+ . url ( 'http://localhost:13370' )
9
+ } ,
5
10
6
11
async 'Button click works' ( browser ) {
7
12
const { getByText } = getQueriesFrom ( browser ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments