provider test

pull/5343/head
bunsenstraat 4 weeks ago committed by Aniket
parent fe6bc2fd27
commit 22dac4d758
  1. 11
      apps/remix-ide-e2e/src/tests/providers.test.ts

@ -12,15 +12,15 @@ module.exports = {
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.switchEnvironment('ganache-provider') .switchEnvironment('ganache-provider')
.waitForElementVisible('*[data-id="ganache-providerModalDialogModalBody-react"]') .waitForElementVisible('*[data-id="ganache-providerModalDialogModalBody-react"]')
.execute(() => { .execute(() => {
(document.querySelector('*[data-id="ganache-providerModalDialogModalBody-react"] input') as any).focus() (document.querySelector('*[data-id="ganache-providerModalDialogModalBody-react"] input') as any).focus()
}, [], () => {}) }, [], () => {})
.clearValue('*[data-id="ganache-providerModalDialogModalBody-react"] input') .clearValue('*[data-id="ganache-providerModalDialogModalBody-react"] input')
.setValue('*[data-id="ganache-providerModalDialogModalBody-react"] input', 'http://127.0.0.1:8084') .setValue('*[data-id="ganache-providerModalDialogModalBody-react"] input', 'http://127.0.0.1:8084')
.modalFooterOKClick('ganache-provider') .modalFooterOKClick('ganache-provider')
.waitForElementContainsText('*[data-id="ganache-providerModalDialogModalBody-react"]', 'Error while connecting to the provider') .pause(2000)
.modalFooterOKClick('ganache-provider') .waitForElementNotPresent({ selector: `[data-id="selected-provider-ganache-provider"]`, timeout: 5000})
.waitForElementNotVisible('*[data-id="ganache-providerModalDialogModalBody-react"]')
.pause(1000) .pause(1000)
}, },
@ -29,6 +29,8 @@ module.exports = {
.waitForElementVisible('*[data-id="ganache-providerModalDialogModalBody-react"]') .waitForElementVisible('*[data-id="ganache-providerModalDialogModalBody-react"]')
.modalFooterOKClick('ganache-provider') .modalFooterOKClick('ganache-provider')
.waitForElementContainsText('*[data-id="settingsNetworkEnv"]', 'Custom (') .waitForElementContainsText('*[data-id="settingsNetworkEnv"]', 'Custom (')
.waitForElementVisible({ selector: `[data-id="selected-provider-ganache-provider"]`, timeout: 5000})
}, },
'Should switch to foundry provider, set a custom URL and fail to connect': function (browser: NightwatchBrowser) { 'Should switch to foundry provider, set a custom URL and fail to connect': function (browser: NightwatchBrowser) {
@ -41,9 +43,6 @@ module.exports = {
.clearValue('*[data-id="foundry-providerModalDialogModalBody-react"] input') .clearValue('*[data-id="foundry-providerModalDialogModalBody-react"] input')
.setValue('*[data-id="foundry-providerModalDialogModalBody-react"] input', 'http://127.0.0.1:8084') .setValue('*[data-id="foundry-providerModalDialogModalBody-react"] input', 'http://127.0.0.1:8084')
.modalFooterOKClick('foundry-provider') .modalFooterOKClick('foundry-provider')
.waitForElementContainsText('*[data-id="foundry-providerModalDialogModalBody-react"]', 'Error while connecting to the provider')
.modalFooterOKClick('foundry-provider')
.waitForElementNotVisible('*[data-id="foundry-providerModalDialogModalBody-react"]')
.pause(1000) .pause(1000)
}, },

Loading…
Cancel
Save