From: Nizamudeen A Date: Thu, 18 Nov 2021 07:13:39 +0000 (+0530) Subject: mgr/dashboard: fix flaky inventory e2e test X-Git-Tag: v17.1.0~387^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cdce5f78ad4a9f4a91837322b83cee89a393a0ca;p=ceph.git mgr/dashboard: fix flaky inventory e2e test When `inventory.getTableCount('total').should('be.eq', totalDiskCount);` this line is executed the table was not loaded properly and hence the getTableCount returns 0 on the first try but on second try it passes since the table is loaded. But in orch e2es the retries are set to 0. I am not sure if it makes sense to set it to 1. Anyway I am adapting the test a bit to expect the count to be equal to totalDiskCount so that the test will wait a bit. Fixes: https://tracker.ceph.com/issues/53353 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/03-inventory.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/03-inventory.e2e-spec.ts index 24a1b89178d25..a64e3bc8c020f 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/03-inventory.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/03-inventory.e2e-spec.ts @@ -12,7 +12,7 @@ describe('Physical Disks page', () => { it('should have correct devices', () => { cy.fixture('orchestrator/inventory.json').then((hosts) => { const totalDiskCount = Cypress._.sumBy(hosts, 'devices.length'); - inventory.getTableCount('total').should('be.eq', totalDiskCount); + inventory.expectTableCount('total', totalDiskCount); for (const host of hosts) { inventory.filterTable('Hostname', host['name']); inventory.getTableCount('found').should('be.eq', host.devices.length);