From bdc6df58c4ff0b60c8a74d596d536e425bd0f4c8 Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Thu, 5 Feb 2026 14:31:04 +0100 Subject: [PATCH 1/7] Added option to change polling for waitVisibility Signed-off-by: Oleksii Korniienko --- .../tests-library/WorkspaceHandlingTests.ts | 22 ++++++++++++++----- tests/e2e/utils/DriverHelper.ts | 7 ++++-- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/tests/e2e/tests-library/WorkspaceHandlingTests.ts b/tests/e2e/tests-library/WorkspaceHandlingTests.ts index 4e884d44709..3b3928ac5be 100644 --- a/tests/e2e/tests-library/WorkspaceHandlingTests.ts +++ b/tests/e2e/tests-library/WorkspaceHandlingTests.ts @@ -150,18 +150,28 @@ export class WorkspaceHandlingTests { Logger.info('Start workspace progress description: ' + alertDescription); } - async createAndOpenWorkspaceWithSpecificEditorAndSample(editor: string, sampleName: string, xPath: string): Promise { + async createAndOpenWorkspaceWithSpecificEditorAndSample( + editor: string, + sampleName: string, + xPath: string, + polling: number = TIMEOUT_CONSTANTS.TS_SELENIUM_START_WORKSPACE_TIMEOUT + ): Promise { Logger.debug('Create and open workspace with specific Editor and Sample. Sample ' + editor); await this.selectEditor(editor); await this.createWorkspace.clickOnSampleNoEditorSelection(sampleName); - await this.waitForControlXpath(xPath); + await this.waitForControlXpath(xPath, polling); } - async createAndOpenWorkspaceWithSpecificEditorAndGitUrl(editor: string, sampleUrl: string, xPath: string): Promise { + async createAndOpenWorkspaceWithSpecificEditorAndGitUrl( + editor: string, + sampleUrl: string, + xPath: string, + polling: number = TIMEOUT_CONSTANTS.TS_SELENIUM_START_WORKSPACE_TIMEOUT + ): Promise { Logger.debug('Create and open workspace with specific Editor and URL. Sample ' + editor); await this.selectEditor(editor); await this.createWorkspace.importFromGitUsingUI(sampleUrl); - await this.waitForControlXpath(xPath); + await this.waitForControlXpath(xPath, polling); } async selectEditor(editor: string): Promise { @@ -175,11 +185,11 @@ export class WorkspaceHandlingTests { return await this.driverHelper.getDriver().findElement(By.xpath(xpath)).getText(); } - private async waitForControlXpath(xPathToWait: string): Promise { + private async waitForControlXpath(xPathToWait: string, polling: number): Promise { await this.browserTabsUtil.waitAndSwitchToAnotherWindow(WorkspaceHandlingTests.parentGUID, TIMEOUT_CONSTANTS.TS_IDE_LOAD_TIMEOUT); await this.obtainWorkspaceNameFromStartingPage(); - await this.driverHelper.waitVisibility(By.xpath(xPathToWait), TIMEOUT_CONSTANTS.TS_SELENIUM_START_WORKSPACE_TIMEOUT); + await this.driverHelper.waitVisibility(By.xpath(xPathToWait), TIMEOUT_CONSTANTS.TS_SELENIUM_START_WORKSPACE_TIMEOUT, polling); } private async getWorkspaceAlertDescription(): Promise { diff --git a/tests/e2e/utils/DriverHelper.ts b/tests/e2e/utils/DriverHelper.ts index f94a6796133..d041fd82b6a 100644 --- a/tests/e2e/utils/DriverHelper.ts +++ b/tests/e2e/utils/DriverHelper.ts @@ -92,8 +92,11 @@ export class DriverHelper { return false; } - async waitVisibility(elementLocator: By, timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise { - const polling: number = TIMEOUT_CONSTANTS.TS_SELENIUM_DEFAULT_POLLING; + async waitVisibility( + elementLocator: By, + timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM, + polling: number = TIMEOUT_CONSTANTS.TS_SELENIUM_DEFAULT_POLLING + ): Promise { const attempts: number = Math.ceil(timeout / polling); Logger.trace(`${elementLocator}`); From 9027a7a11a31ed7f2fa94e6d868281b6ee08b4f2 Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Thu, 5 Feb 2026 14:31:45 +0100 Subject: [PATCH 2/7] added StartWorkspaceUsingIntellijIdeEditor test Signed-off-by: Oleksii Korniienko --- ...artWorkspaceUsingIntellijIdeEditor.spec.ts | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts diff --git a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts new file mode 100644 index 00000000000..f71da5d3d2b --- /dev/null +++ b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts @@ -0,0 +1,161 @@ +/** ******************************************************************* + * copyright (c) 2026 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { KubernetesCommandLineToolsExecutor } from '../../utils/KubernetesCommandLineToolsExecutor'; +import fs from 'fs'; +import path from 'path'; +import YAML from 'yaml'; +import { e2eContainer } from '../../configs/inversify.config'; +import { CLASSES } from '../../configs/inversify.types'; +import { LoginTests } from '../../tests-library/LoginTests'; +import { Dashboard } from '../../pageobjects/dashboard/Dashboard'; +import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil'; +import { WorkspaceHandlingTests } from '../../tests-library/WorkspaceHandlingTests'; +import { expect } from 'chai'; +import { Logger } from '../../utils/Logger'; +import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; +import { DriverHelper } from '../../utils/DriverHelper'; + +suite('Check Intellij IDE desktop Editor with all samples', function (): void { + this.timeout(6000000); + const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); + const pathToSampleFile: string = path.resolve('resources/default-devfile.yaml'); + const workspaceName: string = YAML.parse(fs.readFileSync(pathToSampleFile, 'utf8')).metadata.name; + const kubernetesCommandLineToolsExecutor: KubernetesCommandLineToolsExecutor = e2eContainer.get( + CLASSES.KubernetesCommandLineToolsExecutor + ); + kubernetesCommandLineToolsExecutor.workspaceName = workspaceName; + const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); + const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); + const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); + const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); + + const titlexPath: string = '/html/body/h1'; + var currentTabHandle: string = 'undefined'; + + const pollingForCheckTitle: number = 500; + + const editorsForCheck: string[] = [ + '//*[@id="editor-selector-card-che-incubator/che-clion-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-goland-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-idea-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-phpstorm-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-pycharm-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-rider-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-rubymine-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/che-webstorm-server/latest"]' + ]; + + const samplesForCheck: string[] = [ + 'Empty Workspace', + 'JBoss EAP 8.0', + 'Java Lombok', + 'Node.js Express', + 'Python', + 'Quarkus REST API', + '.NET', + 'Ansible', + 'C/C++', + 'Go', + 'PHP' + ]; + + const gitRepoUrlsToCheck: string[] = [ + 'https://github.com/crw-qe/quarkus-api-example-public/tree/ubi8-latest', + 'https://github.com/crw-qe/ubi9-based-sample-public/tree/ubi9-minimal' + ]; + + const gitRepoUrlsToCheckAirgap: string[] = [ + 'https://gh.crw-qe.com/test-automation-only/ubi8/tree/ubi8-latest', + 'https://gh.crw-qe.com/test-automation-only/ubi9-based-sample-public/tree/ubi9-minimal' + ]; + + async function clearCurrentTabHandle() { + currentTabHandle = 'undefined'; + } + + async function deleteWorkspace(): Promise { + await browserTabsUtil.switchToWindow(currentTabHandle); + await dashboard.openDashboard(); + await browserTabsUtil.closeAllTabsExceptCurrent(); + await dashboard.stopAndRemoveWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName()); + + WorkspaceHandlingTests.clearWorkspaceName(); + clearCurrentTabHandle(); + } + + suiteSetup('Login into Che', async function (): Promise { + await loginTests.loginIntoChe(); + }); + + async function testWorkspaceStartup(editorXpath: string, sampleNameOrUrl: string, isUrl: boolean): Promise { + await dashboard.openDashboard(); + currentTabHandle = await browserTabsUtil.getCurrentWindowHandle(); + + if (isUrl) { + await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndGitUrl( + editorXpath, + sampleNameOrUrl, + titlexPath, + pollingForCheckTitle + ); + } else { + await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndSample( + editorXpath, + sampleNameOrUrl, + titlexPath, + pollingForCheckTitle + ); + } + + // check title + const headerText: string = await workspaceHandlingTests.getTextFromUIElementByXpath(titlexPath); + expect('Workspace ' + WorkspaceHandlingTests.getWorkspaceName() + ' is running').equal(headerText); + + await deleteWorkspace(); + } + + test('Test start of VSCode (desktop) (SSH) with default Samples', async function (): Promise { + for (const editorXpath of editorsForCheck) { + for (const sampleName of samplesForCheck) { + await testWorkspaceStartup(editorXpath, sampleName, false); + } + } + }); + + test('Test start of VSCode (desktop) (SSH) with ubi', async function (): Promise { + for (const editorXpath of editorsForCheck) { + if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) { + Logger.info('Test cluster is disconnected. Using url for airgap cluster.'); + for (const url of gitRepoUrlsToCheckAirgap) { + await testWorkspaceStartup(editorXpath, url, true); + } + } else { + for (const url of gitRepoUrlsToCheck) { + await testWorkspaceStartup(editorXpath, url, true); + } + } + } + }); + + suiteTeardown('Delete DevWorkspace', async function (): Promise { + Logger.info('Deleting DevWorkspace... After all.'); + if (currentTabHandle !== 'undefined') { + await browserTabsUtil.switchToWindow(currentTabHandle); + } + + await dashboard.openDashboard(); + await browserTabsUtil.closeAllTabsExceptCurrent(); + + if (WorkspaceHandlingTests.getWorkspaceName() !== 'undefined') { + await dashboard.deleteStoppedWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName()); + } + }); +}); From fa412b1a909c055c068db14a923f879415a748a4 Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Wed, 4 Mar 2026 14:01:01 +0100 Subject: [PATCH 3/7] Small fixes Signed-off-by: Oleksii Korniienko --- .../StartWorkspaceUsingIntellijIdeEditor.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts index f71da5d3d2b..3c6189556e1 100644 --- a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts +++ b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts @@ -21,10 +21,9 @@ import { WorkspaceHandlingTests } from '../../tests-library/WorkspaceHandlingTes import { expect } from 'chai'; import { Logger } from '../../utils/Logger'; import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; -import { DriverHelper } from '../../utils/DriverHelper'; suite('Check Intellij IDE desktop Editor with all samples', function (): void { - this.timeout(6000000); + this.timeout(24000000); const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); const pathToSampleFile: string = path.resolve('resources/default-devfile.yaml'); const workspaceName: string = YAML.parse(fs.readFileSync(pathToSampleFile, 'utf8')).metadata.name; @@ -35,7 +34,6 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); - const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); const titlexPath: string = '/html/body/h1'; var currentTabHandle: string = 'undefined'; @@ -60,8 +58,8 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { 'Node.js Express', 'Python', 'Quarkus REST API', - '.NET', - 'Ansible', + // '.NET', temporary disabled because of https://issues.redhat.com/browse/CRW-10115 + // 'Ansible', 'C/C++', 'Go', 'PHP' @@ -122,7 +120,7 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { await deleteWorkspace(); } - test('Test start of VSCode (desktop) (SSH) with default Samples', async function (): Promise { + test('Test start of Intellij IDE with default Samples', async function (): Promise { for (const editorXpath of editorsForCheck) { for (const sampleName of samplesForCheck) { await testWorkspaceStartup(editorXpath, sampleName, false); @@ -130,7 +128,7 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { } }); - test('Test start of VSCode (desktop) (SSH) with ubi', async function (): Promise { + test('Test start of Intellij IDE (SSH) with ubi', async function (): Promise { for (const editorXpath of editorsForCheck) { if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) { Logger.info('Test cluster is disconnected. Using url for airgap cluster.'); From 0410cc569454cd5aaa8074e46e4996b14c25f4d0 Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Thu, 5 Mar 2026 14:51:10 +0100 Subject: [PATCH 4/7] added all samples to the list Signed-off-by: Oleksii Korniienko --- .../StartWorkspaceUsingIntellijIdeEditor.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts index 3c6189556e1..a9b06fc1761 100644 --- a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts +++ b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts @@ -58,8 +58,8 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { 'Node.js Express', 'Python', 'Quarkus REST API', - // '.NET', temporary disabled because of https://issues.redhat.com/browse/CRW-10115 - // 'Ansible', + '.NET', + 'Ansible', 'C/C++', 'Go', 'PHP' From eedc99eb7effdb54c6cd3d83cd9bb3cbc9110c0c Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Thu, 5 Mar 2026 15:22:27 +0100 Subject: [PATCH 5/7] small fixes Signed-off-by: Oleksii Korniienko --- .../StartWorkspaceUsingIntellijIdeEditor.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts index a9b06fc1761..b2429dd12e4 100644 --- a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts +++ b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts @@ -36,7 +36,7 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); const titlexPath: string = '/html/body/h1'; - var currentTabHandle: string = 'undefined'; + let currentTabHandle: string = 'undefined'; const pollingForCheckTitle: number = 500; @@ -75,7 +75,7 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { 'https://gh.crw-qe.com/test-automation-only/ubi9-based-sample-public/tree/ubi9-minimal' ]; - async function clearCurrentTabHandle() { + function clearCurrentTabHandle(): void { currentTabHandle = 'undefined'; } From cc33a3b5991e361b012ba7345dd1c39f5f7823f5 Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Thu, 26 Mar 2026 15:35:35 +0100 Subject: [PATCH 6/7] every test is independent Signed-off-by: Oleksii Korniienko --- ...tWorkspaceUsingIntellijIdeaEditor.spec.ts} | 65 +++++++++---------- 1 file changed, 30 insertions(+), 35 deletions(-) rename tests/e2e/specs/dashboard-samples/{StartWorkspaceUsingIntellijIdeEditor.spec.ts => StartWorkspaceUsingIntellijIdeaEditor.spec.ts} (78%) diff --git a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts similarity index 78% rename from tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts rename to tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts index b2429dd12e4..2faf28c243a 100644 --- a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeEditor.spec.ts +++ b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts @@ -35,7 +35,7 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); - const titlexPath: string = '/html/body/h1'; + const titleXpath: string = '/html/body/h1'; let currentTabHandle: string = 'undefined'; const pollingForCheckTitle: number = 500; @@ -48,7 +48,8 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { '//*[@id="editor-selector-card-che-incubator/che-pycharm-server/latest"]', '//*[@id="editor-selector-card-che-incubator/che-rider-server/latest"]', '//*[@id="editor-selector-card-che-incubator/che-rubymine-server/latest"]', - '//*[@id="editor-selector-card-che-incubator/che-webstorm-server/latest"]' + '//*[@id="editor-selector-card-che-incubator/che-webstorm-server/latest"]', + '//*[@id="editor-selector-card-che-incubator/jetbrains-sshd/latest"]' ]; const samplesForCheck: string[] = [ @@ -79,16 +80,6 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { currentTabHandle = 'undefined'; } - async function deleteWorkspace(): Promise { - await browserTabsUtil.switchToWindow(currentTabHandle); - await dashboard.openDashboard(); - await browserTabsUtil.closeAllTabsExceptCurrent(); - await dashboard.stopAndRemoveWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName()); - - WorkspaceHandlingTests.clearWorkspaceName(); - clearCurrentTabHandle(); - } - suiteSetup('Login into Che', async function (): Promise { await loginTests.loginIntoChe(); }); @@ -101,50 +92,51 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndGitUrl( editorXpath, sampleNameOrUrl, - titlexPath, + titleXpath, pollingForCheckTitle ); } else { await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndSample( editorXpath, sampleNameOrUrl, - titlexPath, + titleXpath, pollingForCheckTitle ); } // check title - const headerText: string = await workspaceHandlingTests.getTextFromUIElementByXpath(titlexPath); + const headerText: string = await workspaceHandlingTests.getTextFromUIElementByXpath(titleXpath); expect('Workspace ' + WorkspaceHandlingTests.getWorkspaceName() + ' is running').equal(headerText); - await deleteWorkspace(); } - test('Test start of Intellij IDE with default Samples', async function (): Promise { - for (const editorXpath of editorsForCheck) { - for (const sampleName of samplesForCheck) { + editorsForCheck.forEach((editorXpath) => { + samplesForCheck.forEach((sampleName) => { + test(`Test start of Editor with xPath: ${editorXpath} and with sample name: ${sampleName}`, async function (): Promise { await testWorkspaceStartup(editorXpath, sampleName, false); - } - } + }); + }); }); - test('Test start of Intellij IDE (SSH) with ubi', async function (): Promise { - for (const editorXpath of editorsForCheck) { - if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) { - Logger.info('Test cluster is disconnected. Using url for airgap cluster.'); - for (const url of gitRepoUrlsToCheckAirgap) { - await testWorkspaceStartup(editorXpath, url, true); - } - } else { - for (const url of gitRepoUrlsToCheck) { - await testWorkspaceStartup(editorXpath, url, true); - } - } + editorsForCheck.forEach((editorXpath) => { + if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) { + Logger.info('Test cluster is disconnected. Using url for airgap cluster.'); + gitRepoUrlsToCheckAirgap.forEach((gitUbiUrl) => { + test(`Test start of Editor with xPath: ${editorXpath} and with ubi url: ${gitUbiUrl}`, async function (): Promise { + await testWorkspaceStartup(editorXpath, gitUbiUrl, true); + }); + }); + } else { + gitRepoUrlsToCheck.forEach((gitUbiUrl) => { + test(`Test start of Editor with xPath: ${editorXpath} and with ubi url: ${gitUbiUrl}`, async function (): Promise { + await testWorkspaceStartup(editorXpath, gitUbiUrl, true); + }); + }); } }); - suiteTeardown('Delete DevWorkspace', async function (): Promise { - Logger.info('Deleting DevWorkspace... After all.'); + teardown('Delete DevWorkspace', async function (): Promise { + Logger.info('Delete DevWorkspace. After each test.'); if (currentTabHandle !== 'undefined') { await browserTabsUtil.switchToWindow(currentTabHandle); } @@ -155,5 +147,8 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { if (WorkspaceHandlingTests.getWorkspaceName() !== 'undefined') { await dashboard.deleteStoppedWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName()); } + + WorkspaceHandlingTests.clearWorkspaceName(); + clearCurrentTabHandle(); }); }); From 093a8afdbb5c1a99a282d6e6693e65c82b40511a Mon Sep 17 00:00:00 2001 From: Oleksii Korniienko Date: Thu, 26 Mar 2026 15:43:13 +0100 Subject: [PATCH 7/7] small fixes Signed-off-by: Oleksii Korniienko --- .../StartWorkspaceUsingIntellijIdeaEditor.spec.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts index 2faf28c243a..08752e438db 100644 --- a/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts +++ b/tests/e2e/specs/dashboard-samples/StartWorkspaceUsingIntellijIdeaEditor.spec.ts @@ -107,27 +107,26 @@ suite('Check Intellij IDE desktop Editor with all samples', function (): void { // check title const headerText: string = await workspaceHandlingTests.getTextFromUIElementByXpath(titleXpath); expect('Workspace ' + WorkspaceHandlingTests.getWorkspaceName() + ' is running').equal(headerText); - } - editorsForCheck.forEach((editorXpath) => { - samplesForCheck.forEach((sampleName) => { + editorsForCheck.forEach((editorXpath): void => { + samplesForCheck.forEach((sampleName): void => { test(`Test start of Editor with xPath: ${editorXpath} and with sample name: ${sampleName}`, async function (): Promise { await testWorkspaceStartup(editorXpath, sampleName, false); }); }); }); - editorsForCheck.forEach((editorXpath) => { + editorsForCheck.forEach((editorXpath): void => { if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) { Logger.info('Test cluster is disconnected. Using url for airgap cluster.'); - gitRepoUrlsToCheckAirgap.forEach((gitUbiUrl) => { + gitRepoUrlsToCheckAirgap.forEach((gitUbiUrl): void => { test(`Test start of Editor with xPath: ${editorXpath} and with ubi url: ${gitUbiUrl}`, async function (): Promise { await testWorkspaceStartup(editorXpath, gitUbiUrl, true); }); }); } else { - gitRepoUrlsToCheck.forEach((gitUbiUrl) => { + gitRepoUrlsToCheck.forEach((gitUbiUrl): void => { test(`Test start of Editor with xPath: ${editorXpath} and with ubi url: ${gitUbiUrl}`, async function (): Promise { await testWorkspaceStartup(editorXpath, gitUbiUrl, true); });