Fixed library deployment test

yann300-patch-36
David Disu 3 years ago committed by yann300
parent 8311eab887
commit a2ddbed742
  1. 9
      apps/remix-ide-e2e/src/commands/testConstantFunction.ts
  2. 7
      apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts

@ -20,16 +20,17 @@ function testConstantFunction (browser: NightwatchBrowser, address: string, fnFu
document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight
}, [], function () {
if (expectedInput) {
client.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values)
client.waitForElementPresent('#runTabView input[title="' + expectedInput.types + '"]')
.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values)
}
done()
})
})
.click('.instance button[title="' + fnFullName + '"]')
.pause(1000)
.waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]')
.scrollInto('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]')
.assert.containsText('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]', expectedOutput).perform(() => {
.waitForElementPresent('#instance' + address + ' .udapp_contractActionsContainer .udapp_value')
.scrollInto('#instance' + address + ' .udapp_contractActionsContainer .udapp_value')
.assert.containsText('#instance' + address + ' .udapp_contractActionsContainer .udapp_value', expectedOutput).perform(() => {
cb()
})
}

@ -27,8 +27,7 @@ module.exports = {
console.log('testAutoDeployLib ' + address)
addressRef = address
})
.waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2) > div > button')
.clickInstance(0)
.perform((done) => {
browser.testConstantFunction(addressRef, 'get - call', null, '0:\nuint256: 45').perform(() => {
done()
@ -37,7 +36,6 @@ module.exports = {
},
'Test Manual Deploy Lib': function (browser: NightwatchBrowser) {
console.log('testManualDeployLib')
browser.click('*[data-id="deployAndRunClearInstances"]')
.pause(5000)
.clickLaunchIcon('settings')
@ -104,8 +102,7 @@ function checkDeployShouldSucceed (browser: NightwatchBrowser, address: string,
.getAddressAtPosition(1, (address) => {
addressRef = address
})
.waitForElementPresent('.instance:nth-of-type(3)')
.click('.instance:nth-of-type(3) > div > button')
.clickInstance(1)
.perform(() => {
browser
.testConstantFunction(addressRef, 'get - call', null, '0:\nuint256: 45')

Loading…
Cancel
Save