Skip to content

Commit e84b2f5

Browse files
authored
Fixed project import logic and dashboard locator (#22516)
Signed-off-by: Tibor Dancs <[email protected]>
1 parent 58b6721 commit e84b2f5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tests/e2e/pageobjects/dashboard/Workspaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export class Workspaces {
206206
}
207207

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

212212
private getOpenButtonLocator(workspaceName: string): By {

tests/e2e/specs/SmokeTest.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ suite(`The SmokeTest userstory`, async function (): Promise<void> {
4141
});
4242
test('Check a project folder has been created', async function (): Promise<void> {
4343
const projectName: string = StringUtil.getProjectNameFromGitUrl(factoryUrl);
44-
projectSection = await new SideBarView().getContent().getSection(projectName);
45-
Logger.debug(`new SideBarView().getContent().getSection: get ${projectName}`);
44+
projectSection = (await new SideBarView().getContent().getSections())[0]; // get the (WORKSPACE) section from the sidebar - contains project content
45+
expect(await projectSection.findItem(projectName)).not.eqls(undefined);
4646
});
4747
test('Check the project files was imported', async function (): Promise<void> {
4848
Logger.debug(`projectSection.findItem: find ${BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME}`);
49-
const isFileImported: ViewItem | undefined = await projectSection.findItem(BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME);
49+
const isFileImported: ViewItem | undefined = await projectSection.findItem(
50+
BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME
51+
);
5052
expect(isFileImported).not.eqls(undefined);
5153
});
5254
test('Stop the workspace', async function (): Promise<void> {

tests/e2e/utils/StringUtil.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import { injectable } from 'inversify';
1212
import { Logger } from './Logger';
13-
import { KubernetesCommandLineToolsExecutor } from './KubernetesCommandLineToolsExecutor';
1413

1514
@injectable()
1615
export class StringUtil {

0 commit comments

Comments
 (0)