From: Patrick Seidensal Date: Fri, 23 Aug 2019 23:38:56 +0000 (+0200) Subject: mgr/dashboard: refactoring E2E iscsi test X-Git-Tag: v15.1.0~1745^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d27b645e7b988b78aa331e23307f67ce09ad4c0;p=ceph.git mgr/dashboard: refactoring E2E iscsi test Signed-off-by: Patrick Seidensal --- diff --git a/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts index e4aee230624e..a061341e6794 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts @@ -29,32 +29,14 @@ describe('Iscsi Page', () => { it('should check that tables are displayed and legends are correct', async () => { // Check tables are displayed - expect( - await iscsi - .getDataTable() - .get(0) - .isDisplayed() - ); - expect( - await iscsi - .getDataTable() - .get(1) - .isDisplayed() - ); + const dataTables = iscsi.getDataTables(); + expect(await dataTables.get(0).isDisplayed()); + expect(await dataTables.get(1).isDisplayed()); // Check that legends are correct - expect( - await iscsi - .getLegends() - .get(0) - .getText() - ).toMatch('Gateways'); - expect( - await iscsi - .getLegends() - .get(1) - .getText() - ).toMatch('Images'); + const legends = iscsi.getLegends(); + expect(await legends.get(0).getText()).toMatch('Gateways'); + expect(await legends.get(1).getText()).toMatch('Images'); }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/monitors.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/monitors.e2e-spec.ts index 122f923fd3e9..0b6686e059a5 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/monitors.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/monitors.e2e-spec.ts @@ -48,7 +48,7 @@ describe('Monitors page', () => { it('should check In Quorum and Not In Quorum tables are present', async () => { // check for there to be two tables - expect(await monitors.getDataTable().count()).toEqual(2); + expect(await monitors.getDataTables().count()).toEqual(2); // check for table header 'In Quorum' expect( diff --git a/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts index afe73a08b112..b40b1c2f3001 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts @@ -216,7 +216,7 @@ export abstract class PageHelper { await browser.navigate().back(); } - getDataTable(): ElementArrayFinder { + getDataTables(): ElementArrayFinder { return $$('cd-table'); }