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 22 "src_folders" : [
33 " tests/nightwatch"
44 ],
5- "globals_path" : " src/globals" ,
65 "webdriver" : {
76 "start_process" : true ,
87 "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' ) ;
14const { 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+ }
221
322module . exports . getQueriesFrom = ( browser ) => {
423 const queries = { } ;
@@ -10,6 +29,8 @@ module.exports.getQueriesFrom = (browser) => {
1029 }
1130 return arg ;
1231 } )
32+
33+ injectNWTL ( browser )
1334 // eslint-disable-next-line no-shadow
1435 browser . execute ( function ( queryName , ...args ) {
1536 try {
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ const { getQueriesFrom } = require('../../src');
22
33module . exports = {
44
5+ beforeEach ( browser ) {
6+
7+ browser
8+ . url ( 'http://localhost:13370' )
9+ } ,
510
611 async 'Button click works' ( browser ) {
712 const { getByText } = getQueriesFrom ( browser ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments