From: Patrick Seidensal Date: Mon, 19 Aug 2019 12:03:53 +0000 (+0200) Subject: mgr/dashboard: migrate E2E alerts to async/await X-Git-Tag: v15.1.0~1745^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a348f88f49cf8a766ccf62416725e2b58462db1a;p=ceph.git mgr/dashboard: migrate E2E alerts to async/await Fixes: https://tracker.ceph.com/issues/40693 Signed-off-by: Patrick Seidensal --- diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/alerts.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/alerts.e2e-spec.ts index 963f32eefe6..946cc36019b 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/alerts.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/alerts.e2e-spec.ts @@ -7,17 +7,17 @@ describe('Alerts page', () => { alerts = new Helper().alerts; }); - afterEach(() => { - Helper.checkConsole(); + afterEach(async () => { + await Helper.checkConsole(); }); describe('breadcrumb test', () => { - beforeAll(() => { - alerts.navigateTo(); + beforeAll(async () => { + await alerts.navigateTo(); }); - it('should open and show breadcrumb', () => { - expect(alerts.getBreadcrumbText()).toEqual('Alerts'); + it('should open and show breadcrumb', async () => { + expect(await alerts.getBreadcrumbText()).toEqual('Alerts'); }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts index 3a66896f5b3..de4165247a7 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts @@ -1,5 +1,7 @@ import { browser } from 'protractor'; import { ImagesPageHelper } from './block/images.po'; +import { AlertsPageHelper } from './cluster/alerts.po'; +import { ConfigurationPageHelper } from './cluster/configuration.po'; import { CrushMapPageHelper } from './cluster/crush-map.po'; import { HostsPageHelper } from './cluster/hosts.po'; import { LogsPageHelper } from './cluster/logs.po'; @@ -35,6 +37,8 @@ export class Helper { logs: LogsPageHelper; hosts: HostsPageHelper; crushMap: CrushMapPageHelper; + configuration: ConfigurationPageHelper; + alerts: AlertsPageHelper; constructor() { this.pools = new PoolPageHelper(); @@ -54,6 +58,8 @@ export class Helper { this.logs = new LogsPageHelper(); this.hosts = new HostsPageHelper(); this.crushMap = new CrushMapPageHelper(); + this.configuration = new ConfigurationPageHelper(); + this.alerts = new AlertsPageHelper(); } /**