From: Volker Theile Date: Thu, 29 Aug 2019 10:09:40 +0000 (+0200) Subject: mgr/dashboard: Fix pool deletion e2e X-Git-Tag: v15.1.0~1726^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a973cb34867431e6d73bd4c3682cedfb30abc6c3;p=ceph.git mgr/dashboard: Fix pool deletion e2e Signed-off-by: Volker Theile --- 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 404811ecbb02..c563a52fec55 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)); } }