From 343e2c761f30bce685a80eff20c8c420b55669c4 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Sun, 31 Dec 2023 11:21:19 +0100 Subject: [PATCH] gist fix --- .../remix-ide-e2e/src/commands/refreshPage.ts | 39 +++++++++++++------ apps/remix-ide-e2e/src/helpers/init.ts | 4 +- apps/remix-ide-e2e/src/tests/gist.test.ts | 2 +- .../assets/css/themes/remix-dark_tvx1s2.css | 3 -- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/refreshPage.ts b/apps/remix-ide-e2e/src/commands/refreshPage.ts index 98a9011bca..03f58f0740 100644 --- a/apps/remix-ide-e2e/src/commands/refreshPage.ts +++ b/apps/remix-ide-e2e/src/commands/refreshPage.ts @@ -1,16 +1,33 @@ -import { NightwatchBrowser } from 'nightwatch' +import {NightwatchBrowser} from 'nightwatch' import EventEmitter from 'events' class RefreshPage extends EventEmitter { - command(this: NightwatchBrowser) { - browser.refresh() - .verifyLoad() - .perform((done) => { - done() - this.emit('complete') - }) - } -} + command(this: NightwatchBrowser) { + browser + .refresh() + .verifyLoad() + .perform((done) => { + //if (hideToolTips) { + 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; + } + `) + }, [], done()) + }) + .perform((done) => { + done() + this.emit('complete') + }) + } +} -module.exports = RefreshPage \ No newline at end of file +module.exports = RefreshPage diff --git a/apps/remix-ide-e2e/src/helpers/init.ts b/apps/remix-ide-e2e/src/helpers/init.ts index 85660f57a9..db309f70ef 100644 --- a/apps/remix-ide-e2e/src/helpers/init.ts +++ b/apps/remix-ide-e2e/src/helpers/init.ts @@ -22,7 +22,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url .perform(done()) }) .verifyLoad() - .perform(() => { + .perform((done) => { //if (hideToolTips) { browser.execute(function () { // hide tooltips function addStyle(styleString) { @@ -36,7 +36,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url display:none !important; } `); - }) + }, [], done()) }) .perform(() => { browser.execute(function () { diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 83d122c63e..6681db5bfc 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -38,7 +38,7 @@ module.exports = { .executeScriptInTerminal(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) - .click(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) + .openFile(`gist-${gistid}/README.txt`) // Remix publish to gist /* .click('*[data-id="fileExplorerNewFilepublishToGist"]') diff --git a/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css b/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css index 591d3b99ba..de97d73757 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css +++ b/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css @@ -5409,9 +5409,6 @@ a.close.disabled { padding: 9px 14px; color: #fff; } -.popover { - display: none !important; -} .carousel { position: relative; }