From 16fac82172834978a31eb2bbb10467ddd92b47de Mon Sep 17 00:00:00 2001 From: Tibor Dancs Date: Wed, 20 Sep 2023 09:44:19 +0000 Subject: [PATCH] Revert "Fixed project import logic and dashboard locator (#22516)" This reverts commit e84b2f5dd51c26faa332c6525407c359503ddee3. --- tests/e2e/pageobjects/dashboard/Workspaces.ts | 2 +- tests/e2e/specs/SmokeTest.spec.ts | 8 +++----- tests/e2e/utils/StringUtil.ts | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/e2e/pageobjects/dashboard/Workspaces.ts b/tests/e2e/pageobjects/dashboard/Workspaces.ts index 95e0c5804bd..e06c2b2e123 100644 --- a/tests/e2e/pageobjects/dashboard/Workspaces.ts +++ b/tests/e2e/pageobjects/dashboard/Workspaces.ts @@ -206,7 +206,7 @@ export class Workspaces { } private getActionsPopupButtonLocator(workspaceName: string, buttonText: string): By { - return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//button[text()='${buttonText}']`); + return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//li[@role='menuitem']//button[text()='${buttonText}']`); } private getOpenButtonLocator(workspaceName: string): By { diff --git a/tests/e2e/specs/SmokeTest.spec.ts b/tests/e2e/specs/SmokeTest.spec.ts index 0e2d9df7117..f5b9a7d165d 100644 --- a/tests/e2e/specs/SmokeTest.spec.ts +++ b/tests/e2e/specs/SmokeTest.spec.ts @@ -41,14 +41,12 @@ suite(`The SmokeTest userstory`, async function (): Promise { }); test('Check a project folder has been created', async function (): Promise { const projectName: string = StringUtil.getProjectNameFromGitUrl(factoryUrl); - projectSection = (await new SideBarView().getContent().getSections())[0]; // get the (WORKSPACE) section from the sidebar - contains project content - expect(await projectSection.findItem(projectName)).not.eqls(undefined); + projectSection = await new SideBarView().getContent().getSection(projectName); + Logger.debug(`new SideBarView().getContent().getSection: get ${projectName}`); }); test('Check the project files was imported', async function (): Promise { Logger.debug(`projectSection.findItem: find ${BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME}`); - const isFileImported: ViewItem | undefined = await projectSection.findItem( - BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME - ); + const isFileImported: ViewItem | undefined = await projectSection.findItem(BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME); expect(isFileImported).not.eqls(undefined); }); test('Stop the workspace', async function (): Promise { diff --git a/tests/e2e/utils/StringUtil.ts b/tests/e2e/utils/StringUtil.ts index 4d1251b553c..ead9daef7ce 100644 --- a/tests/e2e/utils/StringUtil.ts +++ b/tests/e2e/utils/StringUtil.ts @@ -10,6 +10,7 @@ import { injectable } from 'inversify'; import { Logger } from './Logger'; +import { KubernetesCommandLineToolsExecutor } from './KubernetesCommandLineToolsExecutor'; @injectable() export class StringUtil {