]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: migrate E2E iscsi to async/await
authorPatrick Seidensal <pseidensal@suse.com>
Mon, 19 Aug 2019 12:06:32 +0000 (14:06 +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/block/iscsi.e2e-spec.ts
src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts

index a07200c7a132c16c6d80e909ebf3056e8fee8e64..f78cec7d7a4e5b452f956dd051df90ceadd76ced 100644 (file)
@@ -7,49 +7,49 @@ describe('Iscsi Page', () => {
     iscsi = new Helper().iscsi;
   });
 
-  afterEach(() => {
-    Helper.checkConsole();
+  afterEach(async () => {
+    await Helper.checkConsole();
   });
 
   describe('breadcrumb test', () => {
-    beforeAll(() => {
-      iscsi.navigateTo();
+    beforeAll(async () => {
+      await iscsi.navigateTo();
     });
 
-    it('should open and show breadcrumb', () => {
-      expect(iscsi.getBreadcrumbText()).toEqual('Overview');
+    it('should open and show breadcrumb', async () => {
+      expect(await iscsi.getBreadcrumbText()).toEqual('Overview');
     });
   });
 
   describe('fields check', () => {
-    beforeAll(() => {
-      iscsi.navigateTo();
+    beforeAll(async () => {
+      await iscsi.navigateTo();
     });
 
-    it('should check that tables are displayed and legends are correct', () => {
+    it('should check that tables are displayed and legends are correct', async () => {
       // Check tables are displayed
       expect(
-        iscsi
-          .getTable()
+        await iscsi
+          .getDataTable()
           .get(0)
           .isDisplayed()
       );
       expect(
-        iscsi
-          .getTable()
+        await iscsi
+          .getDataTable()
           .get(1)
           .isDisplayed()
       );
 
       // Check that legends are correct
       expect(
-        iscsi
+        await iscsi
           .getLegends()
           .get(0)
           .getText()
       ).toMatch('Gateways');
       expect(
-        iscsi
+        await iscsi
           .getLegends()
           .get(1)
           .getText()
index 6ca09022f418f7618516f9fc7009003a1faa2c81..3b0e6fbdfc67c5e91f99ca05452eda9a3c6a0d36 100644 (file)
@@ -1,5 +1,6 @@
 import { browser } from 'protractor';
 import { ImagesPageHelper } from './block/images.po';
+import { IscsiPageHelper } from './block/iscsi.po';
 import { MirroringPageHelper } from './block/mirroring.po';
 import { AlertsPageHelper } from './cluster/alerts.po';
 import { ConfigurationPageHelper } from './cluster/configuration.po';
@@ -41,6 +42,7 @@ export class Helper {
   configuration: ConfigurationPageHelper;
   alerts: AlertsPageHelper;
   mirroring: MirroringPageHelper;
+  iscsi: IscsiPageHelper;
 
   constructor() {
     this.pools = new PoolPageHelper();
@@ -63,6 +65,7 @@ export class Helper {
     this.configuration = new ConfigurationPageHelper();
     this.alerts = new AlertsPageHelper();
     this.mirroring = new MirroringPageHelper();
+    this.iscsi = new IscsiPageHelper();
   }
 
   /**