]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix drain e2e failure
authorNizamudeen A <nia@redhat.com>
Wed, 1 Jun 2022 07:40:14 +0000 (13:10 +0530)
committerNizamudeen A <nia@redhat.com>
Tue, 14 Jun 2022 16:46:48 +0000 (22:16 +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>
(cherry picked from commit dcf0445153694b87ac685f4cfc4094d7d1a708da)

src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/hosts.po.ts

index 2e14c454f37b12937f676f59b80c3c572166f70e..08490d929487830d6c57889f96920fc4b9783d91 100644 (file)
@@ -180,14 +180,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();
   }
 }