Skip to content

Commit

Permalink
mgr/dashboard: migrate E2E osds to async/await
Browse files Browse the repository at this point in the history
Fixes: https://tracker.ceph.com/issues/40693

Signed-off-by: Patrick Seidensal <[email protected]>
  • Loading branch information
p-se committed Aug 28, 2019
1 parent 3bc726f commit 8c306b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
});
3 changes: 3 additions & 0 deletions src/pybind/mgr/dashboard/frontend/e2e/helper.po.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -23,6 +24,7 @@ export class Helper {
users: UsersPageHelper;
nfs: NfsPageHelper;
filesystems: FilesystemsPageHelper;
osds: OSDsPageHelper;

constructor() {
this.pools = new PoolPageHelper();
Expand All @@ -36,6 +38,7 @@ export class Helper {
this.users = new UsersPageHelper();
this.nfs = new NfsPageHelper();
this.filesystems = new FilesystemsPageHelper();
this.osds = new OSDsPageHelper();
}

/**
Expand Down

0 comments on commit 8c306b0

Please sign in to comment.