]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
268cf0ad78626b30cff0b872691087114714e464
[ceph.git] /
1 import { CreateClusterWizardHelper } from 'cypress/integration/cluster/create-cluster.po';
2 import { OSDsPageHelper } from 'cypress/integration/cluster/osds.po';
3
4 const osds = new OSDsPageHelper();
5
6 describe('Create cluster create osds page', () => {
7   const createCluster = new CreateClusterWizardHelper();
8
9   beforeEach(() => {
10     cy.login();
11     Cypress.Cookies.preserveOnce('token');
12     createCluster.navigateTo();
13     createCluster.createCluster();
14     cy.get('.nav-link').contains('Create OSDs').click();
15   });
16
17   it('should check if title contains Create OSDs', () => {
18     cy.get('.title').should('contain.text', 'Create OSDs');
19   });
20
21   describe('when Orchestrator is available', () => {
22     it('should create OSDs', () => {
23       const hostnames = [
24         'ceph-node-00.cephlab.com',
25         'ceph-node-02.cephlab.com',
26         'ceph-node-03.cephlab.com'
27       ];
28       for (const hostname of hostnames) {
29         osds.create('hdd', hostname, true);
30
31         // Go to the Review section and Expand the cluster
32         // because the drive group spec is only stored
33         // in frontend and will be lost when refreshed
34         cy.get('.nav-link').contains('Review').click();
35         cy.get('button[aria-label="Next"]').click();
36         cy.get('cd-dashboard').should('exist');
37         createCluster.navigateTo();
38         createCluster.createCluster();
39         cy.get('.nav-link').contains('Create OSDs').click();
40       }
41     });
42   });
43 });