From: Nathan Date: Fri, 5 Apr 2019 17:17:52 +0000 (-0400) Subject: mgr/dashboard: Updated existing E2E tests to match new format X-Git-Tag: v14.2.10~167^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86aa4d149bfbdc1999fb0ee5e071e83030dbcf04;p=ceph.git mgr/dashboard: Updated existing E2E tests to match new format Fixes: https://tracker.ceph.com/issues/38245 Signed-off-by: Nathan Weinberg (cherry picked from commit f35bef2506192451392c9e48715e669e1247fbec) Conflicts: src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/cluster/crush-map.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/cluster/hosts.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/cluster/logs.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/cluster/monitors.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts src/pybind/mgr/dashboard/frontend/e2e/pools/pools.e2e-spec.ts `getBreadcrumbText` renamed to `getBreadcrumb` to be used with `Helper.waitTextToBePresent` --- 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 b3227fe9c35f..82d1d482d808 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 @@ -12,8 +12,13 @@ describe('Iscsi Page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Overview'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Overview'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.e2e-spec.ts index 91303fb3e276..e8cc711337a3 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/configuration.e2e-spec.ts @@ -12,8 +12,13 @@ describe('Configuration page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Configuration'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Configuration'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/crush-map.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/crush-map.e2e-spec.ts index d64fdee55276..2c1b004be9f1 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/crush-map.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/crush-map.e2e-spec.ts @@ -12,8 +12,13 @@ describe('CRUSH map page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'CRUSH map'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'CRUSH map'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/hosts.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/hosts.e2e-spec.ts index 913d01bfa98a..f0b8a0e2cf85 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/hosts.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/hosts.e2e-spec.ts @@ -12,23 +12,25 @@ describe('Hosts page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Hosts'); - }); + describe('breadcrumb and tab tests', () => { + beforeAll(() => { + page.navigateTo(); + }); - it('should show two tabs', () => { - page.navigateTo(); - expect(Helper.getTabsCount()).toEqual(2); - }); + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Hosts'); + }); - it('should show hosts list tab at first', () => { - page.navigateTo(); - expect(Helper.getTabText(0)).toEqual('Hosts List'); - }); + it('should show two tabs', () => { + expect(Helper.getTabsCount()).toEqual(2); + }); + + it('should show hosts list tab at first', () => { + expect(Helper.getTabText(0)).toEqual('Hosts List'); + }); - it('should show overall performance as a second tab', () => { - page.navigateTo(); - expect(Helper.getTabText(1)).toEqual('Overall Performance'); + it('should show overall performance as a second tab', () => { + expect(Helper.getTabText(1)).toEqual('Overall Performance'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/logs.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/logs.e2e-spec.ts index 13658619d03a..45076e66baf6 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/logs.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/logs.e2e-spec.ts @@ -12,23 +12,25 @@ describe('Logs page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Logs'); - }); + describe('breadcrumb and tab tests', () => { + beforeAll(() => { + page.navigateTo(); + }); - it('should show two tabs', () => { - page.navigateTo(); - expect(Helper.getTabsCount()).toEqual(2); - }); + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Logs'); + }); - it('should show cluster logs tab at first', () => { - page.navigateTo(); - expect(Helper.getTabText(0)).toEqual('Cluster Logs'); - }); + it('should show two tabs', () => { + expect(Helper.getTabsCount()).toEqual(2); + }); + + it('should show cluster logs tab at first', () => { + expect(Helper.getTabText(0)).toEqual('Cluster Logs'); + }); - it('should show audit logs as a second tab', () => { - page.navigateTo(); - expect(Helper.getTabText(1)).toEqual('Audit Logs'); + it('should show audit logs as a second tab', () => { + expect(Helper.getTabText(1)).toEqual('Audit Logs'); + }); }); }); 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 529763b6be2e..5b2676faa73a 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 @@ -12,8 +12,13 @@ describe('Monitors page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Monitors'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Monitors'); + }); }); }); 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 330100104183..61cb0c033c38 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 @@ -12,23 +12,25 @@ describe('OSDs page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'OSDs'); - }); + describe('breadcrumb and tab tests', () => { + beforeAll(() => { + page.navigateTo(); + }); - it('should show two tabs', () => { - page.navigateTo(); - expect(Helper.getTabsCount()).toEqual(2); - }); + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'OSDs'); + }); - it('should show OSDs list tab at first', () => { - page.navigateTo(); - expect(Helper.getTabText(0)).toEqual('OSDs List'); - }); + it('should show two tabs', () => { + expect(Helper.getTabsCount()).toEqual(2); + }); + + it('should show OSDs list tab at first', () => { + expect(Helper.getTabText(0)).toEqual('OSDs List'); + }); - it('should show overall performance as a second tab', () => { - page.navigateTo(); - expect(Helper.getTabText(1)).toEqual('Overall Performance'); + it('should show overall performance as a second tab', () => { + expect(Helper.getTabText(1)).toEqual('Overall Performance'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.e2e-spec.ts index 7ce4c81dce0b..5d68b0fe3f04 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/pools/pools.e2e-spec.ts @@ -12,23 +12,25 @@ describe('Pools page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Pools'); - }); + describe('breadcrumb and tab tests', () => { + beforeAll(() => { + page.navigateTo(); + }); - it('should show two tabs', () => { - page.navigateTo(); - expect(Helper.getTabsCount()).toEqual(2); - }); + it('should open and show breadcrumb', () => { + Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Pools'); + }); - it('should show pools list tab at first', () => { - page.navigateTo(); - expect(Helper.getTabText(0)).toEqual('Pools List'); - }); + it('should show two tabs', () => { + expect(Helper.getTabsCount()).toEqual(2); + }); + + it('should show pools list tab at first', () => { + expect(Helper.getTabText(0)).toEqual('Pools List'); + }); - it('should show overall performance as a second tab', () => { - page.navigateTo(); - expect(Helper.getTabText(1)).toEqual('Overall Performance'); + it('should show overall performance as a second tab', () => { + expect(Helper.getTabText(1)).toEqual('Overall Performance'); + }); }); });