]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix drain e2e failure 46475/head
authorNizamudeen A <nia@redhat.com>
Wed, 1 Jun 2022 07:40:14 +0000 (13:10 +0530)
committerNizamudeen A <nia@redhat.com>
Mon, 13 Jun 2022 08:30:53 +0000 (14:00 +0530)
Cypress sometimes fail to register the click and that causes the
deselect/select to not happen properly. Deselecting the row immediately
after performing the action makes it pass from cypress.

Fixes: https://tracker.ceph.com/issues/55741
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/hosts.po.ts

index b741749f770a781599aab23d39d37d6a1da879da..62c1f85432e86c9d05b1e448ac30aea2a1521615 100644 (file)
@@ -158,14 +158,14 @@ export class HostsPageHelper extends PageHelper {
     this.clickActionButton('start-drain');
     this.checkLabelExists(hostname, ['_no_schedule'], true);
 
+    // unselect it to avoid colliding with any other selection
+    // in different steps
+    this.getTableCell(this.columnIndex.hostname, hostname).click();
+
     this.clickTab('cd-host-details', hostname, 'Daemons');
     cy.get('cd-host-details').within(() => {
       cy.wait(20000);
       this.expectTableCount('total', 0);
     });
-
-    // unselect it to avoid colliding with any other selection
-    // in different steps
-    this.getTableCell(this.columnIndex.hostname, hostname).click();
   }
 }