From f35bef2506192451392c9e48715e669e1247fbec Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 5 Apr 2019 13:17:52 -0400 Subject: [PATCH] mgr/dashboard: Updated existing E2E tests to match new format Fixes: https://tracker.ceph.com/issues/38245 Signed-off-by: Nathan Weinberg --- .../frontend/e2e/block/iscsi.e2e-spec.ts | 11 +++++-- .../e2e/cluster/configuration.e2e-spec.ts | 11 +++++-- .../e2e/cluster/crush-map.e2e-spec.ts | 11 +++++-- .../frontend/e2e/cluster/hosts.e2e-spec.ts | 32 ++++++++++--------- .../frontend/e2e/cluster/logs.e2e-spec.ts | 32 ++++++++++--------- .../frontend/e2e/cluster/monitors.e2e-spec.ts | 11 +++++-- .../frontend/e2e/cluster/osds.e2e-spec.ts | 32 ++++++++++--------- .../frontend/e2e/pools/pools.e2e-spec.ts | 32 ++++++++++--------- .../frontend/e2e/rgw/buckets.e2e-spec.ts | 11 +++++-- .../frontend/e2e/rgw/daemons.e2e-spec.ts | 11 +++++-- .../frontend/e2e/rgw/users.e2e-spec.ts | 11 +++++-- 11 files changed, 124 insertions(+), 81 deletions(-) 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 8a3a03b0637..aa7e034f9b1 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(); - expect(Helper.getBreadcrumbText()).toEqual('Overview'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 9afe5405ab0..e2c25a5bb6b 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(); - expect(Helper.getBreadcrumbText()).toEqual('Configuration'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 c4335ff6219..77e8c06e800 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(); - expect(Helper.getBreadcrumbText()).toEqual('CRUSH map'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 605b63d4d96..806a6efeca2 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(); - expect(Helper.getBreadcrumbText()).toEqual('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', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 243582ee0ce..2e357b4c307 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(); - expect(Helper.getBreadcrumbText()).toEqual('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', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 7eb19f2ecd0..54683ce1131 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(); - expect(Helper.getBreadcrumbText()).toEqual('Monitors'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 41fd52f346e..82e3388dec5 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(); - expect(Helper.getBreadcrumbText()).toEqual('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', () => { + expect(Helper.getBreadcrumbText()).toEqual('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 3b826eb8583..0ab2414dfdd 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(); - expect(Helper.getBreadcrumbText()).toEqual('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', () => { + expect(Helper.getBreadcrumbText()).toEqual('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'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts index 524e5e9ab93..55b2c072356 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/buckets.e2e-spec.ts @@ -12,8 +12,13 @@ describe('RGW buckets page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - expect(Helper.getBreadcrumbText()).toEqual('Buckets'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('Buckets'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/daemons.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/daemons.e2e-spec.ts index a7a0cff0a84..b4249e64307 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/daemons.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/daemons.e2e-spec.ts @@ -12,8 +12,13 @@ describe('RGW daemons page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - expect(Helper.getBreadcrumbText()).toEqual('Daemons'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('Daemons'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts index 41989c2686e..757f0969c42 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/rgw/users.e2e-spec.ts @@ -12,8 +12,13 @@ describe('RGW users page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - expect(Helper.getBreadcrumbText()).toEqual('Users'); + describe('breadcrumb test', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('Users'); + }); }); }); -- 2.39.5