hide tooltips

pull/5370/head
filip mertens 2 years ago committed by Aniket
parent 983c172733
commit 5b08fabf27
  1. 20
      apps/remix-ide-e2e/src/helpers/init.ts

@ -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

Loading…
Cancel
Save