]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
ba6e78ddeeb18ad50a2cdc67f139ad389aa99267
[ceph.git] /
1 import {
2   CreateClusterHostPageHelper,
3   CreateClusterWizardHelper
4 } from 'cypress/integration/cluster/create-cluster.po';
5
6 describe('Create Cluster Review page', () => {
7   const createCluster = new CreateClusterWizardHelper();
8   const createClusterHostPage = new CreateClusterHostPageHelper();
9
10   beforeEach(() => {
11     cy.login();
12     Cypress.Cookies.preserveOnce('token');
13     createCluster.navigateTo();
14     createCluster.createCluster();
15
16     cy.get('.nav-link').contains('Review').click();
17   });
18
19   describe('navigation link test', () => {
20     it('should check if active nav-link is of Review section', () => {
21       cy.get('.nav-link.active').should('contain.text', 'Review');
22     });
23   });
24
25   describe('fields check', () => {
26     it('should check cluster resources table is present', () => {
27       // check for table header 'Cluster Resources'
28       createCluster.getLegends().its(0).should('have.text', 'Cluster Resources');
29
30       // check for fields in table
31       createCluster.getStatusTables().should('contain.text', 'Hosts');
32       createCluster.getStatusTables().should('contain.text', 'Storage Capacity');
33       createCluster.getStatusTables().should('contain.text', 'CPUs');
34       createCluster.getStatusTables().should('contain.text', 'Memory');
35     });
36
37     it('should check Host Details table is present', () => {
38       // check for there to be two tables
39       createCluster.getDataTables().should('have.length', 1);
40
41       // verify correct columns on Host Details table
42       createCluster.getDataTableHeaders(0).contains('Hostname');
43
44       createCluster.getDataTableHeaders(0).contains('Labels');
45
46       createCluster.getDataTableHeaders(0).contains('CPUs');
47
48       createCluster.getDataTableHeaders(0).contains('Cores');
49
50       createCluster.getDataTableHeaders(0).contains('Total Memory');
51
52       createCluster.getDataTableHeaders(0).contains('Raw Capacity');
53
54       createCluster.getDataTableHeaders(0).contains('HDDs');
55
56       createCluster.getDataTableHeaders(0).contains('Flash');
57
58       createCluster.getDataTableHeaders(0).contains('NICs');
59     });
60
61     it('should check default host name is present', () => {
62       createClusterHostPage.check_for_host();
63     });
64   });
65 });