]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
e4744dc70acccb29e5afe71c6cff33b3502764b3
[ceph.git] /
1 /* tslint:disable*/
2 import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
3 import { HostsPageHelper } from '../../cluster/hosts.po';
4 import { ServicesPageHelper } from '../../cluster/services.po';
5 /* tslint:enable*/
6
7 describe('when cluster creation is completed', () => {
8   const createCluster = new CreateClusterWizardHelper();
9   const services = new ServicesPageHelper();
10   const hosts = new HostsPageHelper();
11
12   const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
13
14   beforeEach(() => {
15     cy.login();
16     Cypress.Cookies.preserveOnce('token');
17   });
18
19   it('should redirect to dashboard landing page after cluster creation', () => {
20     createCluster.navigateTo();
21     createCluster.createCluster();
22
23     cy.get('.nav-link').contains('Review').click();
24     cy.get('button[aria-label="Next"]').click();
25     cy.get('cd-dashboard').should('exist');
26   });
27
28   describe('Hosts page', () => {
29     beforeEach(() => {
30       hosts.navigateTo();
31     });
32
33     it('should add one more host', () => {
34       hosts.navigateTo('add');
35       hosts.add(hostnames[3]);
36       hosts.checkExist(hostnames[3], true);
37     });
38
39     it('should have removed "_no_schedule" label', () => {
40       for (const hostname of hostnames) {
41         hosts.checkLabelExists(hostname, ['_no_schedule'], false);
42       }
43     });
44
45     it('should display inventory', () => {
46       hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
47       cy.get('cd-host-details').within(() => {
48         hosts.getTableCount('total').should('be.gte', 0);
49       });
50     });
51
52     it('should display daemons', () => {
53       hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
54       cy.get('cd-host-details').within(() => {
55         hosts.getTableCount('total').should('be.gte', 0);
56       });
57     });
58
59     it('should check if mon daemon is running on all hosts', () => {
60       for (const hostname of hostnames) {
61         hosts.clickTab('cd-host-details', hostname, 'Daemons');
62         cy.get('cd-host-details').within(() => {
63           services.checkServiceStatus('mon');
64         });
65       }
66     });
67   });
68 });