hide tooltips

pull/3530/head^2
filip mertens 2 years ago committed by Aniket
parent d097013fb7
commit e609a0e170
  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