diff --git a/apps/remix-ide-e2e/src/commands/getModalBody.ts b/apps/remix-ide-e2e/src/commands/getModalBody.ts index 85ee421aab..2b9012d8d1 100644 --- a/apps/remix-ide-e2e/src/commands/getModalBody.ts +++ b/apps/remix-ide-e2e/src/commands/getModalBody.ts @@ -3,7 +3,7 @@ import EventEmitter from "events" class GetModalBody extends EventEmitter { command (this: NightwatchBrowser, callback: (value: string, cb: VoidFunction) => void) { - this.api.waitForElementVisible('.modal-body') + this.api.waitForElementPresent('.modal-body') .getText('.modal-body', (result) => { console.log(result) const value = typeof result.value === 'string' ? result.value : null diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 463e8ecf21..a028de6680 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -20,7 +20,7 @@ module.exports = { .openFile('browser/contracts/3_Ballot.sol') .verifyContracts(['Ballot']) .click('#publishOnIpfs') - .pause(5000) + .waitForElementVisible('*[data-id="modalDialogContainer"]') .getModalBody((value, done) => { if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed', '', '') if (value.indexOf('dweb:/ipfs') === -1) browser.assert.fail('ipfs deploy failed', '', '') @@ -32,7 +32,7 @@ module.exports = { 'Publish on Swarm': '' + function (browser: NightwatchBrowser) { browser .click('#publishOnSwarm') - .pause(5000) + .waitForElementVisible('*[data-id="modalDialogContainer"]') .getModalBody((value, done) => { if (value.indexOf('Metadata of "ballot" was successfully.') === -1) browser.assert.fail('swarm deploy failed', '', '') if (value.indexOf('bzz') === -1) browser.assert.fail('swarm deploy failed', '', '')