]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: refactoring E2E iscsi test
authorPatrick Seidensal <pseidensal@suse.com>
Fri, 23 Aug 2019 23:38:56 +0000 (01:38 +0200)
committerPatrick Seidensal <pseidensal@suse.com>
Wed, 28 Aug 2019 07:38:49 +0000 (09:38 +0200)
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/cluster/monitors.e2e-spec.ts
src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts

index e4aee230624ec9d3750b81b4c0d5a2475aa8135b..a061341e679463804c83ceabbaaf2d664f26964e 100644 (file)
@@ -29,32 +29,14 @@ describe('Iscsi Page', () => {
 
     it('should check that tables are displayed and legends are correct', async () => {
       // Check tables are displayed
-      expect(
-        await iscsi
-          .getDataTable()
-          .get(0)
-          .isDisplayed()
-      );
-      expect(
-        await iscsi
-          .getDataTable()
-          .get(1)
-          .isDisplayed()
-      );
+      const dataTables = iscsi.getDataTables();
+      expect(await dataTables.get(0).isDisplayed());
+      expect(await dataTables.get(1).isDisplayed());
 
       // Check that legends are correct
-      expect(
-        await iscsi
-          .getLegends()
-          .get(0)
-          .getText()
-      ).toMatch('Gateways');
-      expect(
-        await iscsi
-          .getLegends()
-          .get(1)
-          .getText()
-      ).toMatch('Images');
+      const legends = iscsi.getLegends();
+      expect(await legends.get(0).getText()).toMatch('Gateways');
+      expect(await legends.get(1).getText()).toMatch('Images');
     });
   });
 });
index 122f923fd3e95c1e182256953d92ce159e36e869..0b6686e059a599620aff6df5d684fe28b84c3b5d 100644 (file)
@@ -48,7 +48,7 @@ describe('Monitors page', () => {
 
     it('should check In Quorum and Not In Quorum tables are present', async () => {
       // check for there to be two tables
-      expect(await monitors.getDataTable().count()).toEqual(2);
+      expect(await monitors.getDataTables().count()).toEqual(2);
 
       // check for table header 'In Quorum'
       expect(
index afe73a08b112fe81cdb3b125f47a50448556f3b7..b40b1c2f3001a32da03c9e8693f6abfde1d9f91e 100644 (file)
@@ -216,7 +216,7 @@ export abstract class PageHelper {
     await browser.navigate().back();
   }
 
-  getDataTable(): ElementArrayFinder {
+  getDataTables(): ElementArrayFinder {
     return $$('cd-table');
   }