]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts
7668cafcf928c23babd75fed2e97c577bacbad87
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / workflow / 03-create-cluster-create-services.e2e-spec.ts
1 /* tslint:disable*/
2 import {
3 CreateClusterServicePageHelper,
4 CreateClusterWizardHelper
5 } from '../../cluster/create-cluster.po';
6 /* tslint:enable*/
7
8 describe('Create cluster create services page', () => {
9 const createCluster = new CreateClusterWizardHelper();
10 const createClusterServicePage = new CreateClusterServicePageHelper();
11
12 const createService = (serviceType: string, serviceName: string, count = '1') => {
13 cy.get('[aria-label=Create]').first().click();
14 createClusterServicePage.addService(serviceType, false, count);
15 createClusterServicePage.checkExist(serviceName, true);
16 };
17
18 beforeEach(() => {
19 cy.login();
20 Cypress.Cookies.preserveOnce('token');
21 createCluster.navigateTo();
22 createCluster.createCluster();
23 cy.get('.nav-link').contains('Create Services').click();
24 });
25
26 it('should check if title contains Create Services', () => {
27 cy.get('.title').should('contain.text', 'Create Services');
28 });
29
30 describe('when Orchestrator is available', () => {
31 const serviceName = 'mds.test';
32
33 it('should create an mds service', () => {
34 createService('mds', serviceName, '1');
35 });
36
37 it('should edit a service', () => {
38 const daemonCount = '2';
39 createClusterServicePage.editService(serviceName, daemonCount);
40 createClusterServicePage.expectPlacementCount(serviceName, daemonCount);
41 });
42
43 it('should delete mds service', () => {
44 createClusterServicePage.deleteService('mds.test');
45 });
46 });
47 });