From 7a49cfb7182bb956c91bf7f53490014336d657ce Mon Sep 17 00:00:00 2001 From: Nathan Weinberg Date: Fri, 8 Feb 2019 10:00:08 -0500 Subject: [PATCH] mgr/dashboard: Added tab tests to Block menu items Fixes: https://tracker.ceph.com/issues/38149 Signed-off-by: Nathan Weinberg --- .../frontend/e2e/block/images.e2e-spec.ts | 21 ++++++++++++++++--- .../frontend/e2e/block/mirroring.e2e-spec.ts | 21 ++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts index 19f684ff3e70..f962258f502d 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts @@ -12,8 +12,23 @@ describe('Images page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - expect(Helper.getBreadcrumbText()).toEqual('Images'); + describe('breadcrumb and tab tests', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('Images'); + }); + + it('should show three tabs', () => { + expect(Helper.getTabsCount()).toEqual(3); + }); + + it('should show text for all tabs', () => { + expect(Helper.getTabText(0)).toEqual('Images'); + expect(Helper.getTabText(1)).toEqual('Trash'); + expect(Helper.getTabText(2)).toEqual('Overall Performance'); + }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/block/mirroring.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/block/mirroring.e2e-spec.ts index 459524a0fbbb..a8f819cc8744 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/block/mirroring.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/block/mirroring.e2e-spec.ts @@ -12,8 +12,23 @@ describe('Mirroring page', () => { Helper.checkConsole(); }); - it('should open and show breadcrumb', () => { - page.navigateTo(); - expect(Helper.getBreadcrumbText()).toEqual('Mirroring'); + describe('breadcrumb and tab tests', () => { + beforeAll(() => { + page.navigateTo(); + }); + + it('should open and show breadcrumb', () => { + expect(Helper.getBreadcrumbText()).toEqual('Mirroring'); + }); + + it('should show three tabs', () => { + expect(Helper.getTabsCount()).toEqual(3); + }); + + it('should show text for all tabs', () => { + expect(Helper.getTabText(0)).toEqual('Issues'); + expect(Helper.getTabText(1)).toEqual('Syncing'); + expect(Helper.getTabText(2)).toEqual('Ready'); + }); }); }); -- 2.47.3