From d4eb92346f286e2f1d768e6a6c349096cbccf524 Mon Sep 17 00:00:00 2001 From: Michael Anstis Date: Mon, 9 Dec 2024 14:28:27 +0000 Subject: [PATCH] Attempts to get tests to pass --- test/ui-test/lightspeedOneClickTrialUITest.ts | 6 ++++++ test/ui-test/lightspeedUiTestPlaybookGenTest.ts | 2 ++ test/ui-test/lightspeedUiTestPlaybookGenWebviewPart2Test.ts | 2 ++ test/ui-test/walkthroughUiTest.ts | 2 ++ 4 files changed, 12 insertions(+) diff --git a/test/ui-test/lightspeedOneClickTrialUITest.ts b/test/ui-test/lightspeedOneClickTrialUITest.ts index e4f5113ee..a26962dda 100644 --- a/test/ui-test/lightspeedOneClickTrialUITest.ts +++ b/test/ui-test/lightspeedOneClickTrialUITest.ts @@ -11,6 +11,7 @@ import { ViewControl, ViewSection, VSBrowser, + until, WebElement, WebView, WebviewView, @@ -255,6 +256,11 @@ describe("Test One Click Trial feature", () => { await tab.select(); await tab.sendKeys(Key.CONTROL, "z", "z", "z", Key.NULL); await editorView.closeAllEditors(); + + // The undo's don't seem to (always) work.. So discard changes + const dialog = new ModalDialog(); + await dialog.pushButton(`Don't Save`); + await dialog.getDriver().wait(until.stalenessOf(dialog), 2000); }); it("Sign out using Accounts global action", async () => { diff --git a/test/ui-test/lightspeedUiTestPlaybookGenTest.ts b/test/ui-test/lightspeedUiTestPlaybookGenTest.ts index 038e56d04..00bf0a1ed 100644 --- a/test/ui-test/lightspeedUiTestPlaybookGenTest.ts +++ b/test/ui-test/lightspeedUiTestPlaybookGenTest.ts @@ -7,6 +7,7 @@ import { Workbench, VSBrowser, EditorView, + until, WebView, ModalDialog, } from "vscode-extension-tester"; @@ -144,6 +145,7 @@ describe("Verify playbook generation features work as expected", function () { await workbenchExecuteCommand("View: Close All Editor Groups"); const dialog = new ModalDialog(); await dialog.pushButton(`Don't Save`); + await dialog.getDriver().wait(until.stalenessOf(dialog), 2000); /* verify generated events */ const expected = [ diff --git a/test/ui-test/lightspeedUiTestPlaybookGenWebviewPart2Test.ts b/test/ui-test/lightspeedUiTestPlaybookGenWebviewPart2Test.ts index a1ba626ba..31af13088 100644 --- a/test/ui-test/lightspeedUiTestPlaybookGenWebviewPart2Test.ts +++ b/test/ui-test/lightspeedUiTestPlaybookGenWebviewPart2Test.ts @@ -7,6 +7,7 @@ import { Workbench, VSBrowser, EditorView, + until, WebView, ModalDialog, } from "vscode-extension-tester"; @@ -173,6 +174,7 @@ describe("Verify playbook generation features work as expected", function () { await workbenchExecuteCommand("View: Close All Editor Groups"); const dialog = new ModalDialog(); await dialog.pushButton(`Don't Save`); + await dialog.getDriver().wait(until.stalenessOf(dialog), 2000); /* verify generated events */ const expected = [ diff --git a/test/ui-test/walkthroughUiTest.ts b/test/ui-test/walkthroughUiTest.ts index 3bb63ad5a..c07f6c90a 100644 --- a/test/ui-test/walkthroughUiTest.ts +++ b/test/ui-test/walkthroughUiTest.ts @@ -4,6 +4,7 @@ import { EditorView, ModalDialog, SettingsEditor, + until, Workbench, } from "vscode-extension-tester"; import { updateSettings, sleep } from "./uiTestHelper"; @@ -98,5 +99,6 @@ describe("Check walkthroughs, elements and associated commands", async () => { await workbench.executeCommand("View: Close All Editor Groups"); const dialogBox = new ModalDialog(); await dialogBox.pushButton(`Don't Save`); + await dialogBox.getDriver().wait(until.stalenessOf(dialogBox), 2000); }); });