From dcf0445153694b87ac685f4cfc4094d7d1a708da Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Wed, 1 Jun 2022 13:10:14 +0530 Subject: [PATCH] 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 --- .../frontend/cypress/integration/cluster/hosts.po.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 b741749f770a..62c1f85432e8 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 @@ -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(); } } -- 2.47.3