mirroring: MirroringPageHelper;
dashboard: DashboardPageHelper;
usermgmt: UserMgmtPageHelper;
+ daemons: DaemonsPageHelper;
+ users: UsersPageHelper;
constructor() {
this.pools = new PoolPageHelper();
this.mirroring = new MirroringPageHelper();
this.dashboard = new DashboardPageHelper();
this.usermgmt = new UserMgmtPageHelper();
+ this.daemons = new DaemonsPageHelper();
+ this.users = new UsersPageHelper();
}
/**
return $$('.nav.nav-tabs li').count();
}
- // getFirstTableCellWithText(content) {
- // return element.all(by.cssContainingText('.datatable-body-cell-label', content)).first();
- // }
+ getFirstTableCellWithText(content): ElementFinder {
+ return element.all(by.cssContainingText('.datatable-body-cell-label', content)).first();
+ }
/**
* Used for instances where a modal container would receive the click rather
daemons = new Helper().daemons;
});
- afterEach(() => {
- Helper.checkConsole();
+ afterEach(async () => {
+ await Helper.checkConsole();
});
describe('breadcrumb and tab tests', () => {
- beforeAll(() => {
- daemons.navigateTo();
+ beforeAll(async () => {
+ await daemons.navigateTo();
});
- it('should open and show breadcrumb', () => {
- expect(daemons.getBreadcrumbText()).toEqual('Daemons');
+ it('should open and show breadcrumb', async () => {
+ expect(await daemons.getBreadcrumbText()).toEqual('Daemons');
});
- it('should show two tabs', () => {
- expect(daemons.getTabsCount()).toEqual(2);
+ it('should show two tabs', async () => {
+ expect(await daemons.getTabsCount()).toEqual(2);
});
- it('should show daemons list tab at first', () => {
- expect(daemons.getTabText(0)).toEqual('Daemons List');
+ it('should show daemons list tab at first', async () => {
+ expect(await daemons.getTabText(0)).toEqual('Daemons List');
});
it('should show overall performance as a second tab', () => {
});
});
- describe('details and performance counters table tests', () => {
- beforeAll(() => {
- daemons.navigateTo();
+ describe('details and performance counters table tests', async () => {
+ beforeAll(async () => {
+ await daemons.navigateTo();
});
- it('should check that details/performance tables are visible when daemon is selected', () => {
- daemons.checkTables();
+ it('should check that details/performance tables are visible when daemon is selected', async () => {
+ await daemons.checkTables();
});
});
});
export class DaemonsPageHelper extends PageHelper {
pages = { index: '/#/rgw/daemon' };
- checkTables() {
- this.navigateTo();
+ async checkTables() {
+ await this.navigateTo();
// click on a daemon so details table appears
- $$('.datatable-body-cell-label')
+ await $$('.datatable-body-cell-label')
.first()
.click();
const performance_counters_table = tab_container.all(by.css('cd-table')).get(1);
// check details table is visible
- expect(details_table.isDisplayed()).toBe(true);
+ expect(await details_table.isDisplayed()).toBe(true);
// check at least one field is present
- expect(details_table.getText()).toMatch('ceph_version');
+ expect(await details_table.getText()).toMatch('ceph_version');
// check performance counters table is not currently visible
- expect(performance_counters_table.isDisplayed()).toBe(false);
+ expect(await performance_counters_table.isDisplayed()).toBe(false);
// click on performance counters tab and check table is loaded
- element(by.cssContainingText('.nav-link', 'Performance Counters')).click();
- expect(performance_counters_table.isDisplayed()).toBe(true);
+ await element(by.cssContainingText('.nav-link', 'Performance Counters')).click();
+ expect(await performance_counters_table.isDisplayed()).toBe(true);
// check at least one field is present
- expect(performance_counters_table.getText()).toMatch('objecter.op_r');
+ expect(await performance_counters_table.getText()).toMatch('objecter.op_r');
// check details table is not currently visible
- expect(details_table.isDisplayed()).toBe(false);
+ expect(await details_table.isDisplayed()).toBe(false);
// click on performance details tab
- element(by.cssContainingText('.nav-link', 'Performance Details')).click();
+ await element(by.cssContainingText('.nav-link', 'Performance Details')).click();
// checks the other tabs' content isn't visible
- expect(details_table.isDisplayed()).toBe(false);
- expect(performance_counters_table.isDisplayed()).toBe(false);
+ expect(await details_table.isDisplayed()).toBe(false);
+ expect(await performance_counters_table.isDisplayed()).toBe(false);
// TODO: Expect Grafana iFrame
}
}