]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/monitors.e2e-spec.ts
import 15.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / cluster / monitors.e2e-spec.ts
CommitLineData
e306af50
TL
1import { MonitorsPageHelper } from './monitors.po';
2
3describe('Monitors page', () => {
4 const monitors = new MonitorsPageHelper();
5
6 beforeEach(() => {
7 cy.login();
8 monitors.navigateTo();
9 });
10
11 describe('breadcrumb test', () => {
12 it('should open and show breadcrumb', () => {
13 monitors.expectBreadcrumbText('Monitors');
14 });
15 });
16
17 describe('fields check', () => {
18 it('should check status table is present', () => {
19 // check for table header 'Status'
20 monitors.getLegends().its(0).should('have.text', 'Status');
21
22 // check for fields in table
23 monitors
24 .getStatusTables()
25 .should('contain.text', 'Cluster ID')
26 .and('contain.text', 'monmap modified')
27 .and('contain.text', 'monmap epoch')
28 .and('contain.text', 'quorum con')
29 .and('contain.text', 'quorum mon')
30 .and('contain.text', 'required con')
31 .and('contain.text', 'required mon');
32 });
33
34 it('should check In Quorum and Not In Quorum tables are present', () => {
35 // check for there to be two tables
36 monitors.getDataTables().should('have.length', 2);
37
38 // check for table header 'In Quorum'
39 monitors.getLegends().its(1).should('have.text', 'In Quorum');
40
41 // check for table header 'Not In Quorum'
42 monitors.getLegends().its(2).should('have.text', 'Not In Quorum');
43
44 // verify correct columns on In Quorum table
45 monitors.getDataTableHeaders(0).contains('Name');
46
47 monitors.getDataTableHeaders(0).contains('Rank');
48
49 monitors.getDataTableHeaders(0).contains('Public Address');
50
51 monitors.getDataTableHeaders(0).contains('Open Sessions');
52
53 // verify correct columns on Not In Quorum table
54 monitors.getDataTableHeaders(1).contains('Name');
55
56 monitors.getDataTableHeaders(1).contains('Rank');
57
58 monitors.getDataTableHeaders(1).contains('Public Address');
59 });
60 });
61});