Skip to content

Commit 047dcee

Browse files
committed
fix e2e
1 parent 75acfcd commit 047dcee

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

apps/remix-ide-e2e/src/commands/clickInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ClickInstance extends EventEmitter {
66
index = index + 2
77
const selector = '.instance:nth-of-type(' + index + ') > div > button'
88

9-
this.api.waitForElementContainsText(selector, '', 60000).scrollAndClick(selector).perform(() => { this.emit('complete') })
9+
this.api.waitForElementPresent(selector).waitForElementContainsText(selector, '', 60000).scrollAndClick(selector).perform(() => { this.emit('complete') })
1010
return this
1111
}
1212
}

apps/remix-ide-e2e/src/tests/transactionExecution.spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ module.exports = {
137137
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite
138138
.click('#runTabView button[class^="instanceButton"]')
139139
.waitForElementPresent('.instance:nth-of-type(2)')
140+
.click('*[data-id="deployAndRunClearInstances"]')
140141
},
141142

142143
'Should Compile and Deploy a contract which define a custom error, the error should be logged in the terminal': function (browser: NightwatchBrowser) {
143144
browser.testContracts('customError.sol', sources[4]['customError.sol'], ['C'])
144145
.clickLaunchIcon('udapp')
145146
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite
146147
.click('#runTabView button[class^="instanceButton"]')
147-
.waitForElementPresent('.instance:nth-of-type(3)')
148-
.click('.instance:nth-of-type(3) > div > button')
148+
.clickInstance(0)
149149
.clickFunction('g - transact (not payable)')
150150
.pause(5000)
151151
.journalLastChildIncludes('Error provided by the contract:')
@@ -158,15 +158,15 @@ module.exports = {
158158
.journalLastChildIncludes('"documentation": "param2"')
159159
.journalLastChildIncludes('"documentation": "param3"')
160160
.journalLastChildIncludes('Debug the transaction to get more information.')
161+
.click('*[data-id="deployAndRunClearInstances"]')
161162
},
162163

163164
'Should Compile and Deploy a contract which define a custom error, the error should be logged in the terminal , using London VM Fork': function (browser: NightwatchBrowser) {
164165
browser
165166
.click('*[data-id="settingsVMLondonMode"]') // switch to London fork
166167
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite
167168
.click('#runTabView button[class^="instanceButton"]')
168-
.waitForElementPresent('.instance:nth-of-type(2)')
169-
.click('.instance:nth-of-type(2) > div > button')
169+
.clickInstance(0)
170170
.clickFunction('g - transact (not payable)')
171171
.journalLastChildIncludes('Error provided by the contract:')
172172
.journalLastChildIncludes('CustomError : error description')
@@ -184,8 +184,7 @@ module.exports = {
184184
browser.testContracts('customErrorLib.sol', sources[5]['customErrorLib.sol'], ['D'])
185185
.clickLaunchIcon('udapp')
186186
.click('#runTabView button[class^="instanceButton"]')
187-
.waitForElementPresent('.instance:nth-of-type(3)')
188-
.click('.instance:nth-of-type(3) > div > button')
187+
.clickInstance(1)
189188
.clickFunction('h - transact (not payable)')
190189
.pause(5000)
191190
.journalLastChildIncludes('Error provided by the contract:')

0 commit comments

Comments
 (0)