Skip to content

Commit

Permalink
Fix removing workspace via UI - new popup. (#16561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Katka92 authored Apr 7, 2020
1 parent 6ea0182 commit 7580ee9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/pageobjects/dashboard/Dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class Dashboard {
await this.workspaces.waitWorkspaceListItem(workspaceName);
await this.workspaces.clickWorkspaceListItem(workspaceName);
await this.workspaces.clickDeleteButtonOnWorkspaceDetails();
await this.workspaces.clickConfirmDeletionButton();
await this.workspaces.confirmWorkspaceDeletion();
await this.workspaces.waitPage();
await this.workspaces.waitWorkspaceListItemAbcence(workspaceName);
}
Expand Down
10 changes: 7 additions & 3 deletions tests/e2e/pageobjects/dashboard/Workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ export class Workspaces {
await this.driverHelper.waitDisappearance(workspaceListItemLocator, timeout);
}

async clickConfirmDeletionButton(timeout: number = TestConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
Logger.debug('Workspaces.clickConfirmDeletionButton');
async confirmWorkspaceDeletion(timeout: number = TestConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
Logger.debug('Workspaces.confirmWorkspaceDeletion');

await this.driverHelper.waitAndClick(By.css('#ok-dialog-button'), timeout);
const checkbox: By = By.xpath(`//che-popup//input[contains(@type, 'checkbox')]`);
await this.driverHelper.waitAndClick(checkbox, 10000);

const deleteButton: By = By.xpath('//che-popup//che-button-danger');
await this.driverHelper.waitAndClick(deleteButton, 10000);
}

private getWorkspaceListItemLocator(workspaceName: string): string {
Expand Down

0 comments on commit 7580ee9

Please sign in to comment.