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