From d5355842680094383920e16d4de1e12287dc7c3b Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Fri, 7 Feb 2025 14:35:33 +0530 Subject: [PATCH] adding other cases too --- test/smoke/src/areas/preferences/preferences.test.ts | 8 ++++---- test/smoke/src/areas/search/search.test.ts | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/test/smoke/src/areas/preferences/preferences.test.ts b/test/smoke/src/areas/preferences/preferences.test.ts index 02d5cdeac0522..a2088a2771743 100644 --- a/test/smoke/src/areas/preferences/preferences.test.ts +++ b/test/smoke/src/areas/preferences/preferences.test.ts @@ -29,8 +29,7 @@ export function setup(logger: Logger) { await app.workbench.keybindingsEditor.updateKeybinding('workbench.action.toggleSidebarPosition', 'View: Toggle Primary Side Bar Position', 'ctrl+u', 'Control+U'); - await app.code.dispatchKeybinding('ctrl+u'); - await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.RIGHT); + await app.code.dispatchKeybinding('ctrl+u', () => app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.RIGHT)); }); }); @@ -53,8 +52,9 @@ export function setup(logger: Logger) { const app = this.app as Application; await app.workbench.editors.newUntitledFile(); - await app.code.dispatchKeybinding('enter'); - await app.code.waitForElements('.line-numbers', false, elements => !!elements.length); + await app.code.dispatchKeybinding('enter', async () => { + await app.code.waitForElements('.line-numbers', false, elements => !!elements.length); + }); // Turn off line numbers await app.workbench.settingsEditor.searchSettingsUI('editor.lineNumbers'); diff --git a/test/smoke/src/areas/search/search.test.ts b/test/smoke/src/areas/search/search.test.ts index 78f79b61838f8..f635ad827dfb8 100644 --- a/test/smoke/src/areas/search/search.test.ts +++ b/test/smoke/src/areas/search/search.test.ts @@ -23,11 +23,13 @@ export function setup(logger: Logger) { const app = this.app as Application; await app.workbench.search.openSearchViewlet(); - await app.code.dispatchKeybinding('PageUp'); - await app.workbench.search.hasActivityBarMoved(); + await app.code.dispatchKeybinding('PageUp', async () => { + await app.workbench.search.hasActivityBarMoved(); + }); - await app.code.dispatchKeybinding('PageUp'); - await app.workbench.search.hasActivityBarMoved(); + await app.code.dispatchKeybinding('PageUp', async () => { + await app.workbench.search.hasActivityBarMoved(); + }); }); it('searches for body & checks for correct result number', async function () {