From: Nizamudeen A Date: Wed, 1 Jun 2022 07:40:14 +0000 (+0530) Subject: mgr/dashboard: fix drain e2e failure X-Git-Tag: v16.2.11~486^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e71da7fb28aa85a777fdd5df143fa420aa98096;p=ceph.git mgr/dashboard: fix drain e2e failure 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 (cherry picked from commit dcf0445153694b87ac685f4cfc4094d7d1a708da) --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/hosts.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/hosts.po.ts index 2e14c454f37b..08490d929487 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/hosts.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/hosts.po.ts @@ -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(); } }