mgr/dashboard: refactoring E2E iscsi test

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
This commit is contained in:
Patrick Seidensal 2019-08-24 01:38:56 +02:00
parent ac901bf4cf
commit 3d27b645e7
3 changed files with 8 additions and 26 deletions

View 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');
});
});
});

View 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(

View File

@ -216,7 +216,7 @@ export abstract class PageHelper {
await browser.navigate().back();
}
getDataTable(): ElementArrayFinder {
getDataTables(): ElementArrayFinder {
return $$('cd-table');
}