]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: migrate E2E osds to async/await
authorPatrick Seidensal <pseidensal@suse.com>
Mon, 19 Aug 2019 09:54:56 +0000 (11:54 +0200)
committerPatrick Seidensal <pseidensal@suse.com>
Wed, 28 Aug 2019 07:38:48 +0000 (09:38 +0200)
Fixes: https://tracker.ceph.com/issues/40693
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts
src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts

index 391e8f111148cc1c92474e9df9c3688a7951e563..7f0201c1a52b87cb30e084254fb0f59a48f2b0a6 100644 (file)
@@ -7,29 +7,29 @@ describe('OSDs page', () => {
     osds = new Helper().osds;
   });
 
-  afterEach(() => {
-    Helper.checkConsole();
+  afterEach(async () => {
+    await Helper.checkConsole();
   });
 
   describe('breadcrumb and tab tests', () => {
-    beforeAll(() => {
-      osds.navigateTo();
+    beforeAll(async () => {
+      await osds.navigateTo();
     });
 
-    it('should open and show breadcrumb', () => {
-      expect(osds.getBreadcrumbText()).toEqual('OSDs');
+    it('should open and show breadcrumb', async () => {
+      expect(await osds.getBreadcrumbText()).toEqual('OSDs');
     });
 
-    it('should show two tabs', () => {
-      expect(osds.getTabsCount()).toEqual(2);
+    it('should show two tabs', async () => {
+      expect(await osds.getTabsCount()).toEqual(2);
     });
 
-    it('should show OSDs list tab at first', () => {
-      expect(osds.getTabText(0)).toEqual('OSDs List');
+    it('should show OSDs list tab at first', async () => {
+      expect(await osds.getTabText(0)).toEqual('OSDs List');
     });
 
-    it('should show overall performance as a second tab', () => {
-      expect(osds.getTabText(1)).toEqual('Overall Performance');
+    it('should show overall performance as a second tab', async () => {
+      expect(await osds.getTabText(1)).toEqual('Overall Performance');
     });
   });
 });
index 1671ed1effbf65d4fc3912af56628e4af0da09f2..4b76fdc3a768a0def22bd8eec53052a42dc53099 100644 (file)
@@ -1,5 +1,6 @@
 import { browser } from 'protractor';
 import { ImagesPageHelper } from './block/images.po';
+import { OSDsPageHelper } from './cluster/osds.po';
 import { FilesystemsPageHelper } from './filesystems/filesystems.po';
 import { NfsPageHelper } from './nfs/nfs.po';
 import { PoolPageHelper } from './pools/pools.po';
@@ -23,6 +24,7 @@ export class Helper {
   users: UsersPageHelper;
   nfs: NfsPageHelper;
   filesystems: FilesystemsPageHelper;
+  osds: OSDsPageHelper;
 
   constructor() {
     this.pools = new PoolPageHelper();
@@ -36,6 +38,7 @@ export class Helper {
     this.users = new UsersPageHelper();
     this.nfs = new NfsPageHelper();
     this.filesystems = new FilesystemsPageHelper();
+    this.osds = new OSDsPageHelper();
   }
 
   /**