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