From 1a3f50afbe8b659a80555bde5e01cd89dfb05786 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Thu, 14 Mar 2024 11:05:47 +0100 Subject: [PATCH] fix import --- apps/remixdesktop/src/plugins/appUpdater.ts | 2 +- apps/remixdesktop/test/tests/app/gist.test.ts | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 apps/remixdesktop/test/tests/app/gist.test.ts diff --git a/apps/remixdesktop/src/plugins/appUpdater.ts b/apps/remixdesktop/src/plugins/appUpdater.ts index c7731e08fa..b7223e3d3d 100644 --- a/apps/remixdesktop/src/plugins/appUpdater.ts +++ b/apps/remixdesktop/src/plugins/appUpdater.ts @@ -2,7 +2,7 @@ import { ElectronBasePlugin, ElectronBasePluginClient } from "@remixproject/plug import { Profile } from "@remixproject/plugin-utils" import { autoUpdater } from "electron-updater" import { app } from 'electron'; -import { isE2E } from "src/main"; +import { isE2E } from "../main"; const profile = { displayName: 'appUpdater', diff --git a/apps/remixdesktop/test/tests/app/gist.test.ts b/apps/remixdesktop/test/tests/app/gist.test.ts new file mode 100644 index 0000000000..bff1391781 --- /dev/null +++ b/apps/remixdesktop/test/tests/app/gist.test.ts @@ -0,0 +1,21 @@ +import { NightwatchBrowser } from 'nightwatch' + +const gist_id = 'a4af87f9ae096a01c7819e75b32d1b72' +module.exports = { + before: function (browser: NightwatchBrowser, done: VoidFunction) { + done() + }, + 'start gist': function (browser: NightwatchBrowser) { + browser + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .waitForElementVisible('*[data-id="landingPageImportFromGist"]') + .click('*[data-id="landingPageImportFromGist"]') + .waitForElementVisible('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]') + .execute(function () { + (document.querySelector('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]') as any).focus() + }) + .setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', gist_id) + .modalFooterOKClick('gisthandler') + //.pause() + } +} \ No newline at end of file