|
|
|
@ -10,8 +10,6 @@ type LoadPlugin = { |
|
|
|
|
export default function (browser: NightwatchBrowser, callback: VoidFunction, url?: string, preloadPlugins = true, loadPlugin?: LoadPlugin, hideToolTips: boolean = true): void { |
|
|
|
|
browser |
|
|
|
|
.url(url || 'http://127.0.0.1:8080') |
|
|
|
|
//.switchBrowserTab(0)
|
|
|
|
|
|
|
|
|
|
.perform((done) => { |
|
|
|
|
if (!loadPlugin) return done() |
|
|
|
|
browser |
|
|
|
@ -34,35 +32,37 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
addStyle(` |
|
|
|
|
.bs-popover-right { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
.bs-popover-top { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
.bs-popover-left { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
.bs-popover-bottom { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
.popover { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
`);
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (preloadPlugins) { |
|
|
|
|
initModules(browser, () => { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
|
.waitForElementVisible('[for="autoCompile"]') |
|
|
|
|
.click('[for="autoCompile"]') |
|
|
|
|
.verify.elementPresent('[data-id="compilerContainerAutoCompile"]:checked') |
|
|
|
|
.perform(() => { callback() }) |
|
|
|
|
}}) |
|
|
|
|
.perform(() => { |
|
|
|
|
browser.execute(function () {
|
|
|
|
|
(window as any).logs = [] |
|
|
|
|
console.log = function () { |
|
|
|
|
(window as any).logs.push(JSON.stringify(arguments)) |
|
|
|
|
} |
|
|
|
|
console.error = function () { |
|
|
|
|
(window as any).logs.push(JSON.stringify(arguments)) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
callback() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
.perform(() => { |
|
|
|
|
if (preloadPlugins) { |
|
|
|
|
initModules(browser, () => { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
|
.waitForElementVisible('[for="autoCompile"]') |
|
|
|
|
.click('[for="autoCompile"]') |
|
|
|
|
.verify.elementPresent('[data-id="compilerContainerAutoCompile"]:checked') |
|
|
|
|
.perform(() => { callback() }) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
callback() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function initModules(browser: NightwatchBrowser, callback: VoidFunction) { |
|
|
|
|