@@ -206,16 +206,40 @@ module.exports = {
206206 } ,
207207 // depends on Should debug using generated sources
208208 'Should call the debugger api: getTrace #group4' : function ( browser : NightwatchBrowser ) {
209+ let txhash
209210 browser
210- . addFile ( 'test_jsGetTrace.js' , { content : jsGetTrace } )
211+ . clickLaunchIcon ( 'udapp' )
212+ . perform ( ( done ) => {
213+ browser . getLastTransactionHash ( ( hash ) => {
214+ txhash = hash
215+ done ( )
216+ } )
217+ } )
218+ . perform ( ( done ) => {
219+ browser . addFile ( 'test_jsGetTrace.js' , { content : jsGetTrace . replace ( '<txhash>' , txhash ) } ) . perform ( ( ) => {
220+ done ( )
221+ } )
222+ } )
211223 . executeScriptInTerminal ( 'remix.exeCurrent()' )
212224 . pause ( 3000 )
213225 . waitForElementContainsText ( '*[data-id="terminalJournal"]' , '{"gas":"0x5752","return":"0x0000000000000000000000000000000000000000000000000000000000000000","structLogs":' , 60000 )
214226 } ,
215227 // depends on Should debug using generated sources
216228 'Should call the debugger api: debug #group4' : function ( browser : NightwatchBrowser ) {
229+ let txhash
217230 browser
218- . addFile ( 'test_jsDebug.js' , { content : jsDebug } )
231+ . clickLaunchIcon ( 'udapp' )
232+ . perform ( ( done ) => {
233+ browser . getLastTransactionHash ( ( hash ) => {
234+ txhash = hash
235+ done ( )
236+ } )
237+ } )
238+ . perform ( ( done ) => {
239+ browser . addFile ( 'test_jsDebug.js' , { content : jsDebug . replace ( '<txhash>' , txhash ) } ) . perform ( ( ) => {
240+ done ( )
241+ } )
242+ } )
219243 . executeScriptInTerminal ( 'remix.exeCurrent()' )
220244 . pause ( 3000 )
221245 . clickLaunchIcon ( 'debugger' )
@@ -495,7 +519,7 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line
495519
496520const jsGetTrace = `(async () => {
497521 try {
498- const result = await remix.call('debugger', 'getTrace', '0x00a9f5b1ac2c9cb93e5890ea86c81efbd36b619ef2378136ef74d8c6171ddda6 ')
522+ const result = await remix.call('debugger', 'getTrace', '<txhash> ')
499523 console.log('result ', result)
500524 } catch (e) {
501525 console.log(e.message)
@@ -504,7 +528,7 @@ const jsGetTrace = `(async () => {
504528
505529const jsDebug = `(async () => {
506530 try {
507- const result = await remix.call('debugger', 'debug', '0x00a9f5b1ac2c9cb93e5890ea86c81efbd36b619ef2378136ef74d8c6171ddda6 ')
531+ const result = await remix.call('debugger', 'debug', '<txhash> ')
508532 console.log('result ', result)
509533 } catch (e) {
510534 console.log(e.message)
0 commit comments