From a973cb34867431e6d73bd4c3682cedfb30abc6c3 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Thu, 29 Aug 2019 12:09:40 +0200 Subject: [PATCH] mgr/dashboard: Fix pool deletion e2e Signed-off-by: Volker Theile --- .../mgr/dashboard/frontend/e2e/pools/pools.po.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.po.ts index 404811ecbb0..c563a52fec5 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.po.ts @@ -85,15 +85,14 @@ export class PoolPageHelper extends PageHelper { @PageHelper.restrictTo(pages.index) async delete(name: string): Promise { - const tableCell = await this.getTableCellByContent(name); - await tableCell.click(); + await this.waitClickable(this.getTableCell(name)); + await this.getTableCell(name).click(); await $('.table-actions button.dropdown-toggle').click(); // open submenu await $('li.delete a').click(); // click on "delete" menu item - const confirmationInput = () => $('#confirmation'); - await this.waitPresence(confirmationInput()); - await this.clickCheckbox(confirmationInput()); - await element(by.cssContainingText('button', 'Delete Pool')).click(); // Click Delete item - - return Promise.resolve(); + // wait for pop-up to be visible (checks for title of pop-up) + await this.waitVisibility($('.modal-body')); + await this.clickCheckbox($('.custom-control-label')); + await element(by.cssContainingText('button', 'Delete Pool')).click(); + return this.waitStaleness(this.getTableCell(name)); } } -- 2.47.3