|
|
@ -10,7 +10,7 @@ declare global { |
|
|
|
const localPluginData: Profile & LocationProfile & ExternalProfile = { |
|
|
|
const localPluginData: Profile & LocationProfile & ExternalProfile = { |
|
|
|
name: 'localPlugin', |
|
|
|
name: 'localPlugin', |
|
|
|
displayName: 'Local Plugin', |
|
|
|
displayName: 'Local Plugin', |
|
|
|
canActivate: ['dGitProvider', 'flattener', 'solidityUnitTesting', 'udapp'], |
|
|
|
canActivate: ['dGitProvider', 'flattener', 'solidityUnitTesting', 'udapp', 'hardhat-provider'], |
|
|
|
url: 'http://localhost:2020', |
|
|
|
url: 'http://localhost:2020', |
|
|
|
location: 'sidePanel' |
|
|
|
location: 'sidePanel' |
|
|
|
} |
|
|
|
} |
|
|
@ -328,15 +328,20 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
|
|
// PROVIDER
|
|
|
|
// PROVIDER
|
|
|
|
|
|
|
|
|
|
|
|
'Should switch to hardhat provider (provider plugin)': async function (browser: NightwatchBrowser) { |
|
|
|
'Should switch to hardhat provider (provider plugin) #group8': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
|
|
|
|
.frameParent() |
|
|
|
|
|
|
|
.useCss() |
|
|
|
|
|
|
|
.clickLaunchIcon('pluginManager') |
|
|
|
|
|
|
|
.scrollAndClick('[data-id="pluginManagerComponentActivateButtonhardhat-provider"]') |
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
.click('*[data-id="Hardhat provider"]') |
|
|
|
.click('*[data-id="Hardhat Provider"]') |
|
|
|
.modalFooterOKClick('hardhatprovider') |
|
|
|
.modalFooterOKClick('hardhatprovider') |
|
|
|
.waitForElementContainsText('*[data-id="settingsNetworkEnv"]', 'Custom') // e.g Custom (1337) network
|
|
|
|
.waitForElementContainsText('*[data-id="settingsNetworkEnv"]', 'Custom') // e.g Custom (1337) network
|
|
|
|
.getValue('*[data-id="settingsNetworkEnv"]', (result) => { |
|
|
|
.clickLaunchIcon('localPlugin') |
|
|
|
browser.assert.ok((result.value as string).match(/^Custom \(\d+\) network$/) !== undefined, 'Expected to ') |
|
|
|
.useXpath() |
|
|
|
}) |
|
|
|
// @ts-ignore
|
|
|
|
|
|
|
|
.frame(0) |
|
|
|
.perform(async () => { |
|
|
|
.perform(async () => { |
|
|
|
const request = { |
|
|
|
const request = { |
|
|
|
id: 9999, |
|
|
|
id: 9999, |
|
|
@ -344,8 +349,8 @@ module.exports = { |
|
|
|
method: 'net_listening', |
|
|
|
method: 'net_listening', |
|
|
|
params: [] |
|
|
|
params: [] |
|
|
|
} |
|
|
|
} |
|
|
|
const result = true |
|
|
|
const result = '{"jsonrpc":"2.0","result":true,"id":9999}' |
|
|
|
await clickAndCheckLog(browser, 'hardhat-provider:sendAsync', {}, result, request) |
|
|
|
await clickAndCheckLog(browser, 'hardhat-provider:sendAsync', result, null, request) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|