Skip to content

Commit

Permalink
Fix xpath to get progress text from create workspace page
Browse files Browse the repository at this point in the history
Signed-off-by: Dmytro Nochevnov <[email protected]>
  • Loading branch information
dmytro-ndp committed Nov 7, 2024
1 parent 190961e commit 7ff0b63
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/e2e/tests-library/WorkspaceHandlingTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { By, error } from 'selenium-webdriver';
@injectable()
export class WorkspaceHandlingTests {
private static WORKSPACE_NAME: By = By.xpath('//h1[contains(.,"Starting workspace ")]');
private static WORKSPACE_STATUS: By = By.xpath('//*/span[@class="pf-c-label__content"]/text()');
private static WORKSPACE_ALERT_TITLE: By = By.xpath('//*/h4[@class="pf-c-alert__title"]/text()');
private static WORKSPACE_STATUS: By = By.xpath('//*/span[@class="pf-c-label__content"]');
private static WORKSPACE_ALERT_TITLE: By = By.xpath('//h4[@class="pf-c-alert__title"]');
private static WORKSPACE_ALERT_DESCRIPTION: By = By.xpath('//*/div[@class="pf-c-alert__description"]');
private static workspaceName: string = 'undefined';
private static parentGUID: string;
Expand Down Expand Up @@ -152,7 +152,7 @@ export class WorkspaceHandlingTests {

async getWorkspaceAlertTitle(): Promise<string> {
try {
return await this.driverHelper.getDriver().findElement(WorkspaceHandlingTests.WORKSPACE_ALERT_TITLE).getText();
return await this.driverHelper.getDriver().findElement(WorkspaceHandlingTests.WORKSPACE_ALERT_TITLE).getAttribute('innerHTML');
} catch (err) {
return '';
}
Expand All @@ -164,8 +164,7 @@ export class WorkspaceHandlingTests {
const alertDescription: string = await this.getWorkspaceAlertDescription();

Logger.info('Start workspace status: ' + status);
if (status === 'Failed') {
Logger.info('Start workspace details: ' + alertTitle + ' - ' + alertDescription);
}
Logger.info('Start workspace progress title: ' + alertTitle);
Logger.info('Start workspace progress description: ' + alertDescription);
}
}

0 comments on commit 7ff0b63

Please sign in to comment.