]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
a5b54786b87388bdb8ed1a9d279a724fd580f9b9
[ceph-ci.git] /
1 import { CreateClusterWizardHelper } from 'cypress/integration/cluster/create-cluster.po';
2 import { HostsPageHelper } from 'cypress/integration/cluster/hosts.po';
3 import { OSDsPageHelper } from 'cypress/integration/cluster/osds.po';
4 import { ServicesPageHelper } from 'cypress/integration/cluster/services.po';
5
6 describe('when cluster creation is completed', () => {
7   const createCluster = new CreateClusterWizardHelper();
8
9   beforeEach(() => {
10     cy.login();
11     Cypress.Cookies.preserveOnce('token');
12   });
13
14   it('should redirect to dashboard landing page after cluster creation', () => {
15     createCluster.navigateTo();
16     createCluster.createCluster();
17
18     cy.get('button[aria-label="Next"]').click();
19     cy.get('button[aria-label="Next"]').click();
20     cy.get('button[aria-label="Next"]').click();
21     cy.get('button[aria-label="Next"]').click();
22
23     cy.get('cd-dashboard').should('exist');
24   });
25
26   describe('Hosts page', () => {
27     const hosts = new HostsPageHelper();
28     const hostnames = ['ceph-node-00.cephlab.com', 'ceph-node-02.cephlab.com'];
29
30     beforeEach(() => {
31       hosts.navigateTo();
32     });
33     it('should have removed "_no_schedule" label', () => {
34       for (let host = 0; host < hostnames.length; host++) {
35         cy.get('datatable-row-wrapper').should('not.have.text', '_no_schedule');
36       }
37     });
38
39     it('should display inventory', () => {
40       hosts.clickHostTab(hostnames[1], 'Physical Disks');
41       cy.get('cd-host-details').within(() => {
42         hosts.getTableCount('total').should('be.gte', 0);
43       });
44     });
45
46     it('should display daemons', () => {
47       hosts.clickHostTab(hostnames[1], 'Daemons');
48       cy.get('cd-host-details').within(() => {
49         hosts.getTableCount('total').should('be.gte', 0);
50       });
51     });
52   });
53
54   describe('OSDs page', () => {
55     const osds = new OSDsPageHelper();
56
57     beforeEach(() => {
58       osds.navigateTo();
59     });
60
61     it('should check if osds are created', { retries: 1 }, () => {
62       osds.expectTableCount('total', 2);
63     });
64   });
65
66   describe('Services page', () => {
67     const services = new ServicesPageHelper();
68
69     beforeEach(() => {
70       services.navigateTo();
71     });
72
73     it('should check if services are created', () => {
74       services.checkExist('rgw.rgw', true);
75     });
76   });
77 });