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