From: Patrick Seidensal Date: Mon, 19 Aug 2019 12:06:32 +0000 (+0200) Subject: mgr/dashboard: migrate E2E iscsi to async/await X-Git-Tag: v15.1.0~1745^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50c40ea8f1e423fa38d35154544e9b845e368337;p=ceph.git mgr/dashboard: migrate E2E iscsi to async/await Fixes: https://tracker.ceph.com/issues/40693 Signed-off-by: Patrick Seidensal --- diff --git a/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts index a07200c7a132..f78cec7d7a4e 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/block/iscsi.e2e-spec.ts @@ -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() diff --git a/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts index 6ca09022f418..3b0e6fbdfc67 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts @@ -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(); } /**