From: Kiefer Chang Date: Thu, 7 Nov 2019 04:11:21 +0000 (+0800) Subject: mgr/dashboard: fix e2e test failure for OSDs X-Git-Tag: v15.1.0~1013^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31451%2Fhead;p=ceph.git mgr/dashboard: fix e2e test failure for OSDs When clicking a selected row, the row becomes unselected and the detail component is hidden. Rearrange related tests by selecting the row only once. Fixes: https://tracker.ceph.com/issues/42671 Signed-off-by: Kiefer Chang --- diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts index 7ab4bf3268ea..8671d5a50910 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts @@ -36,11 +36,6 @@ describe('OSDs page', () => { await expect(osds.getTableTotalCount()).toEqual(osds.getTableRows().count()); }); - it('should verify that selected footer increases when an entry is clicked', async () => { - await osds.getFirstCell().click(); - await expect(osds.getTableSelectedCount()).toEqual(1); - }); - it('should verify that buttons exist', async () => { await expect(element(by.cssContainingText('button', 'Scrub')).isPresent()).toBe(true); await expect( @@ -48,20 +43,29 @@ describe('OSDs page', () => { ).toBe(true); }); - it('should show the correct text for the tab labels', async () => { - await osds.getFirstCell().click(); - const tabHeadings = $$('#tabset-osd-details > div > tab').map((e) => - e.getAttribute('heading') - ); - await expect(tabHeadings).toEqual([ - 'Devices', - 'Attributes (OSD map)', - 'Metadata', - 'Device health', - 'Performance counter', - 'Histogram', - 'Performance Details' - ]); + describe('by selecting one row in OSDs List', () => { + beforeAll(async () => { + await osds.getFirstCell().click(); + }); + + it('should verify that selected footer increases', async () => { + await expect(osds.getTableSelectedCount()).toEqual(1); + }); + + it('should show the correct text for the tab labels', async () => { + const tabHeadings = $$('#tabset-osd-details > div > tab').map((e) => + e.getAttribute('heading') + ); + await expect(tabHeadings).toEqual([ + 'Devices', + 'Attributes (OSD map)', + 'Metadata', + 'Device health', + 'Performance counter', + 'Histogram', + 'Performance Details' + ]); + }); }); }); });