hide panel command

pull/5371/head
bunsenstraat 3 weeks ago
parent 51f6a52c91
commit 578036f576
  1. 32
      apps/remix-ide-e2e/src/commands/hidePopUpPanel.ts
  2. 25
      apps/remix-ide-e2e/src/commands/hidePopupPanel.ts
  3. 2
      apps/remix-ide-e2e/src/helpers/init.ts
  4. 2
      apps/remix-ide-e2e/src/types/index.d.ts
  5. 1
      apps/remixdesktop/test/tests/app/compiler.test.ts
  6. 1
      apps/remixdesktop/test/tests/app/externaleditor.test.ts
  7. 1
      apps/remixdesktop/test/tests/app/foundry.test.ts
  8. 1
      apps/remixdesktop/test/tests/app/gist.test.ts
  9. 2
      apps/remixdesktop/test/tests/app/git-ui.test.ts
  10. 2
      apps/remixdesktop/test/tests/app/git-ui_2.test.ts
  11. 2
      apps/remixdesktop/test/tests/app/git-ui_3.test.ts
  12. 2
      apps/remixdesktop/test/tests/app/git-ui_4.test.ts
  13. 1
      apps/remixdesktop/test/tests/app/git.test.ts
  14. 2
      apps/remixdesktop/test/tests/app/github.test.ts
  15. 2
      apps/remixdesktop/test/tests/app/github_2.test.ts
  16. 2
      apps/remixdesktop/test/tests/app/github_3.test.ts
  17. 1
      apps/remixdesktop/test/tests/app/hardhat.test.ts
  18. 1
      apps/remixdesktop/test/tests/app/offline.test.ts
  19. 1
      apps/remixdesktop/test/tests/app/search.test.ts
  20. 1
      apps/remixdesktop/test/tests/app/slitherlinux.test.ts
  21. 1
      apps/remixdesktop/test/tests/app/templates.test.ts
  22. 1
      apps/remixdesktop/test/tests/app/xterm.test.ts
  23. 1
      apps/remixdesktop/test/tests/app/xtermwin.test.ts
  24. 1
      apps/remixdesktop/test/types/index.d.ts

@ -1,32 +0,0 @@
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

@ -0,0 +1,25 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class HidePopupPanel extends EventEmitter {
command(this: NightwatchBrowser) {
browser
.perform((done) => {
browser.execute(function () {
return localStorage.getItem('did_show_popup_panel')
}, [], function (result) {
if (!result.value) {
browser.waitForElementVisible('*[data-id="aiStatusButton"]')
.click('*[data-id="aiStatusButton"]')
}
done()
})
})
.perform((done) => {
done()
this.emit('complete')
})
}
}
module.exports = HidePopupPanel

@ -14,7 +14,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url
.url(url || 'http://127.0.0.1:8080')
.pause(5000)
.switchBrowserTab(0)
.hidePopUpPanel()
.hidePopupPanel()
.pause()
.perform((done) => {
if (!loadPlugin) return done()

@ -74,10 +74,10 @@ declare module 'nightwatch' {
connectToExternalHttpProvider: (url: string, identifier: string) => NightwatchBrowser
waitForElementNotContainsText: (id: string, value: string, timeout: number = 10000) => NightwatchBrowser
hideToolTips: (this: NightwatchBrowser) => NightwatchBrowser
hidePopupPanel: (this: NightwatchBrowser) => NightwatchBrowser
enableClipBoard: () => NightwatchBrowser
addFileSnekmate: (name: string, content: NightwatchContractContent) => NightwatchBrowser
selectFiles: (selelectedElements: any[]) => NightwatchBrowser
hidePopUpPanel: (this: NightwatchBrowser) => NightwatchBrowser
}
export interface NightwatchBrowser {

@ -3,6 +3,7 @@ import { NightwatchBrowser } from 'nightwatch'
module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
'download compiler': function (browser: NightwatchBrowser) {

@ -2,6 +2,7 @@ import {NightwatchBrowser} from 'nightwatch'
const testsBash = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
open: function (browser: NightwatchBrowser) {

@ -9,6 +9,7 @@ const dir = '/tmp/' + projectDir
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
installFoundry: function (browser: NightwatchBrowser) {

@ -3,6 +3,7 @@ import { NightwatchBrowser } from 'nightwatch'
const gist_id = '02a847917a6a7ecaf4a7e0d4e68715bf'
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
'start gist': function (browser: NightwatchBrowser) {

@ -13,7 +13,7 @@ let gitserver: ChildProcess
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},
after: function (browser: NightwatchBrowser) {

@ -13,7 +13,7 @@ let gitserver: ChildProcess
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},
after: function (browser: NightwatchBrowser) {

@ -13,7 +13,7 @@ let gitserver: ChildProcess
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},
after: function (browser: NightwatchBrowser) {

@ -13,7 +13,7 @@ let gitserver: ChildProcess
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},
after: function (browser: NightwatchBrowser) {

@ -4,6 +4,7 @@ import { NightwatchBrowser } from 'nightwatch'
module.exports = {
'@isogit': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
'clone a repo': function (browser: NightwatchBrowser) {

@ -3,7 +3,7 @@ import { NightwatchBrowser } from "nightwatch"
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},

@ -3,7 +3,7 @@ import { NightwatchBrowser } from "nightwatch"
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},

@ -5,7 +5,7 @@ let commitCount = 0
let branchCount = 0
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hideToolTips()
browser.hideToolTips().hidePopupPanel()
done()
},

@ -8,6 +8,7 @@ const dir = path.join('remix-desktop-test-' + Date.now().toString())
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
setuphardhat: function (browser: NightwatchBrowser) {

@ -4,6 +4,7 @@ import { NightwatchBrowser } from 'nightwatch'
module.exports = {
'@offline': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
'open default template': function (browser: NightwatchBrowser) {

@ -3,6 +3,7 @@ import { NightwatchBrowser } from 'nightwatch'
module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
'open default template': function (browser: NightwatchBrowser) {

@ -3,6 +3,7 @@ import { ChildProcess, spawn, execSync } from 'child_process'
import { homedir } from 'os'
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
open: function (browser: NightwatchBrowser) {

@ -3,6 +3,7 @@ import { NightwatchBrowser } from 'nightwatch'
module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
'open default template': function (browser: NightwatchBrowser) {

@ -5,6 +5,7 @@ import {NightwatchBrowser} from 'nightwatch'
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
open: function (browser: NightwatchBrowser) {

@ -2,6 +2,7 @@ import {NightwatchBrowser} from 'nightwatch'
const tests = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
browser.hidePopupPanel()
done()
},
open: function (browser: NightwatchBrowser) {

@ -71,6 +71,7 @@ declare module 'nightwatch' {
connectToExternalHttpProvider: (url: string, identifier: string) => NightwatchBrowser
waitForElementNotContainsText: (id: string, value: string, timeout: number = 10000) => NightwatchBrowser
hideToolTips: (this: NightwatchBrowser) => NightwatchBrowser
hidePopupPanel: (this: NightwatchBrowser) => NightwatchBrowser
enableClipBoard: () => NightwatchBrowser
}

Loading…
Cancel
Save