hide panel command

pull/5371/head
bunsenstraat 2 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') .url(url || 'http://127.0.0.1:8080')
.pause(5000) .pause(5000)
.switchBrowserTab(0) .switchBrowserTab(0)
.hidePopUpPanel() .hidePopupPanel()
.pause() .pause()
.perform((done) => { .perform((done) => {
if (!loadPlugin) return done() if (!loadPlugin) return done()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save