Skip to content

Commit

Permalink
Fixed project import logic and dashboard locator (#22516)
Browse files Browse the repository at this point in the history
Signed-off-by: Tibor Dancs <[email protected]>
  • Loading branch information
ScrewTSW authored Sep 18, 2023
1 parent 58b6721 commit e84b2f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/pageobjects/dashboard/Workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class Workspaces {
}

private getActionsPopupButtonLocator(workspaceName: string, buttonText: string): By {
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//li[@role='menuitem']//button[text()='${buttonText}']`);
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//button[text()='${buttonText}']`);
}

private getOpenButtonLocator(workspaceName: string): By {
Expand Down
8 changes: 5 additions & 3 deletions tests/e2e/specs/SmokeTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ suite(`The SmokeTest userstory`, async function (): Promise<void> {
});
test('Check a project folder has been created', async function (): Promise<void> {
const projectName: string = StringUtil.getProjectNameFromGitUrl(factoryUrl);
projectSection = await new SideBarView().getContent().getSection(projectName);
Logger.debug(`new SideBarView().getContent().getSection: get ${projectName}`);
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);
});
test('Check the project files was imported', async function (): Promise<void> {
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<void> {
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/utils/StringUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import { injectable } from 'inversify';
import { Logger } from './Logger';
import { KubernetesCommandLineToolsExecutor } from './KubernetesCommandLineToolsExecutor';

@injectable()
export class StringUtil {
Expand Down

0 comments on commit e84b2f5

Please sign in to comment.