Revert "Fixed library deployment test"

This reverts commit b2beb9467ec43a74da945c793230b61228709019.
pull/5370/head
ioedeveloper 4 years ago
parent 84e2dc016b
commit a56a1ca8b3
  1. 2
      apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts
  2. 2
      apps/remix-ide-e2e/src/commands/testConstantFunction.ts
  3. 10
      apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts

@ -15,7 +15,7 @@ class GetAddressAtPosition extends EventEmitter {
}
function getAddressAtPosition (browser: NightwatchBrowser, index: number, callback: (pos: string) => void) {
browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]', 60000)
browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]')
.execute(function (index) {
const deployedContracts = document.querySelectorAll('*[data-shared="universalDappUiInstance"]')
const id = deployedContracts[index].getAttribute('id')

@ -27,7 +27,7 @@ function testConstantFunction (browser: NightwatchBrowser, address: string, fnFu
})
.click('.instance button[title="' + fnFullName + '"]')
.pause(1000)
.waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]', 60000)
.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(() => {
cb()

@ -80,7 +80,7 @@ function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFuncti
.getText('div[class^="terminal"]', (value) => {
console.log('value: ', value)
})
.waitForElementContainsText('div[class^="terminal"]', '<address> is not a valid address', 60000)
.assert.containsText('div[class^="terminal"]', '<address> is not a valid address')
.perform(() => { callback() })
}
@ -100,14 +100,14 @@ function checkDeployShouldSucceed (browser: NightwatchBrowser, address: string,
.clickLaunchIcon('udapp')
.selectContract('test') // deploy lib
.createContract('')
.getAddressAtPosition(0, (address) => {
.getAddressAtPosition(1, (address) => {
addressRef = address
})
.waitForElementPresent('.instance')
.click('.instance > div > button')
.waitForElementPresent('.instance:nth-of-type(3)')
.click('.instance:nth-of-type(3) > div > button')
.perform(() => {
browser
.testConstantFunction(addressRef, 'getInt - call', null, '0:\nuint256: 45')
.testConstantFunction(addressRef, 'get - call', null, '0:\nuint256: 45')
.perform(() => { callback() })
})
}

Loading…
Cancel
Save