parent
b3d5a42c10
commit
51f6a52c91
@ -0,0 +1,32 @@ |
||||
import { NightwatchBrowser } from 'nightwatch' |
||||
import EventEmitter from 'events' |
||||
|
||||
class HidePopUpPanel extends EventEmitter { |
||||
command(this: NightwatchBrowser) { |
||||
browser |
||||
.perform((done) => { |
||||
browser.execute(function () { |
||||
// hide tooltips
|
||||
function addStyle(styleString) { |
||||
const style = document.createElement('style') |
||||
style.textContent = styleString |
||||
document.head.append(style) |
||||
} |
||||
addStyle(` |
||||
.popover { |
||||
display:none !important; |
||||
} |
||||
#scamDetails { |
||||
display:none !important; |
||||
} |
||||
`)
|
||||
}, [], done()) |
||||
}) |
||||
.perform((done) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
} |
||||
} |
||||
|
||||
module.exports = HidePopUpPanel |
Loading…
Reference in new issue