]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Added tab tests to Block menu items
authorNathan Weinberg <nathan2@stwmd.net>
Fri, 8 Feb 2019 15:00:08 +0000 (10:00 -0500)
committerNathan Weinberg <nathan2@stwmd.net>
Fri, 8 Feb 2019 15:00:08 +0000 (10:00 -0500)
Fixes: https://tracker.ceph.com/issues/38149
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
src/pybind/mgr/dashboard/frontend/e2e/block/images.e2e-spec.ts
src/pybind/mgr/dashboard/frontend/e2e/block/mirroring.e2e-spec.ts

index 19f684ff3e703655bc5166f8129089e407eaf11d..f962258f502d261c8ee85ccacbee1bc4a61ad024 100644 (file)
@@ -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');
+    });
   });
 });
index 459524a0fbbb2d6081743c051f2bec6d5090c9eb..a8f819cc874444bc7b1f6b7a2f0dc657945d3ada 100644 (file)
@@ -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');
+    });
   });
 });