From: Nizamudeen A Date: Mon, 8 Feb 2021 20:21:25 +0000 (+0530) Subject: mgr/dashboard: check .badge instead of text for expected label X-Git-Tag: v17.1.0~2949^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6156055a78e63cef0eede0670816a24c3a097b4c;p=ceph.git 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 --- 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);