]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Fix pool deletion e2e
authorVolker Theile <vtheile@suse.com>
Thu, 29 Aug 2019 10:09:40 +0000 (12:09 +0200)
committerVolker Theile <vtheile@suse.com>
Thu, 29 Aug 2019 14:25:51 +0000 (16:25 +0200)
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/e2e/pools/pools.po.ts

index 404811ecbb02cdf29ee1d624b0a3c7b3be0b4d19..c563a52fec5550e5575932209f6b00f77467fe17 100644 (file)
@@ -85,15 +85,14 @@ export class PoolPageHelper extends PageHelper {
 
   @PageHelper.restrictTo(pages.index)
   async delete(name: string): Promise<any> {
-    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));
   }
 }