1 import { MonitorsPageHelper } from './monitors.po';
3 describe('Monitors page', () => {
4 let monitors: MonitorsPageHelper;
7 monitors = new MonitorsPageHelper();
10 afterEach(async () => {
11 await MonitorsPageHelper.checkConsole();
14 describe('breadcrumb test', () => {
15 beforeAll(async () => {
16 await monitors.navigateTo();
19 it('should open and show breadcrumb', async () => {
20 await monitors.waitTextToBePresent(monitors.getBreadcrumb(), 'Monitors');
24 describe('fields check', () => {
25 beforeAll(async () => {
26 await monitors.navigateTo();
29 it('should check status table is present', async () => {
30 // check for table header 'Status'
38 // check for fields in table
39 await expect(monitors.getStatusTables().getText()).toMatch('Cluster ID');
40 await expect(monitors.getStatusTables().getText()).toMatch('monmap modified');
41 await expect(monitors.getStatusTables().getText()).toMatch('monmap epoch');
42 await expect(monitors.getStatusTables().getText()).toMatch('quorum con');
43 await expect(monitors.getStatusTables().getText()).toMatch('quorum mon');
44 await expect(monitors.getStatusTables().getText()).toMatch('required con');
45 await expect(monitors.getStatusTables().getText()).toMatch('required mon');
48 it('should check In Quorum and Not In Quorum tables are present', async () => {
49 // check for there to be two tables
50 await expect(monitors.getDataTables().count()).toEqual(2);
52 // check for table header 'In Quorum'
58 ).toMatch('In Quorum');
60 // check for table header 'Not In Quorum'
66 ).toMatch('Not In Quorum');
68 // verify correct columns on In Quorum table
71 .getDataTableHeaders()
77 .getDataTableHeaders()
83 .getDataTableHeaders()
86 ).toMatch('Public Address');
89 .getDataTableHeaders()
92 ).toMatch('Open Sessions');
94 // verify correct columns on Not In Quorum table
97 .getDataTableHeaders()
103 .getDataTableHeaders()
109 .getDataTableHeaders()
112 ).toMatch('Public Address');