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