From 6156055a78e63cef0eede0670816a24c3a097b4c Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Tue, 9 Feb 2021 01:51:25 +0530 Subject: [PATCH] mgr/dashboard: check .badge instead of text for expected label this change fixes a regression introduced by 8c5e31ec1a13bc53394eb2cb6880d74db169fac4 which broke the 01-hosts.e2e-spec.ts test driven by test_dashboard_e2e.sh Fixes: https://tracker.ceph.com/issues/49205 Signed-off-by: Nizamudeen A --- .../frontend/cypress/integration/cluster/hosts.po.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 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 c7a6b91795e1..ae7b901f44e1 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 @@ -104,9 +104,9 @@ export class HostsPageHelper extends PageHelper { // First find row with hostname, then find labels in the row this.getTableCell(this.columnIndex.hostname, hostname) .parent() - .find(`datatable-body-cell:nth-child(${this.columnIndex.labels})`) + .find(`datatable-body-cell:nth-child(${this.columnIndex.labels}) .badge`) .should(($ele) => { - const newLabels = $ele.text().split(', '); + const newLabels = $ele.toArray().map((v) => v.innerText); for (const label of labels) { if (add) { expect(newLabels).to.include(label); -- 2.47.3