|
|
|
@ -7,7 +7,7 @@ type LoadPlugin = { |
|
|
|
|
url: string |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export default function (browser: NightwatchBrowser, callback: VoidFunction, url?: string, preloadPlugins = true, loadPlugin?: LoadPlugin): void { |
|
|
|
|
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)
|
|
|
|
@ -27,6 +27,24 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url |
|
|
|
|
}) |
|
|
|
|
.verifyLoad() |
|
|
|
|
.perform(() => { |
|
|
|
|
if (hideToolTips) { |
|
|
|
|
browser.execute(function () { // hide tooltips
|
|
|
|
|
function addStyle(styleString) { |
|
|
|
|
const style = document.createElement('style'); |
|
|
|
|
style.textContent = styleString; |
|
|
|
|
document.head.append(style); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
addStyle(` |
|
|
|
|
.bs-popover-right { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
.bs-popover-top { |
|
|
|
|
display:none !important; |
|
|
|
|
} |
|
|
|
|
`);
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (preloadPlugins) { |
|
|
|
|
initModules(browser, () => { |
|
|
|
|
browser |
|
|
|
|