From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- .../03-create-cluster-create-services.e2e-spec.ts | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts (limited to 'src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts') diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts new file mode 100644 index 000000000..7668cafcf --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/03-create-cluster-create-services.e2e-spec.ts @@ -0,0 +1,47 @@ +/* tslint:disable*/ +import { + CreateClusterServicePageHelper, + CreateClusterWizardHelper +} from '../../cluster/create-cluster.po'; +/* tslint:enable*/ + +describe('Create cluster create services page', () => { + const createCluster = new CreateClusterWizardHelper(); + const createClusterServicePage = new CreateClusterServicePageHelper(); + + const createService = (serviceType: string, serviceName: string, count = '1') => { + cy.get('[aria-label=Create]').first().click(); + createClusterServicePage.addService(serviceType, false, count); + createClusterServicePage.checkExist(serviceName, true); + }; + + beforeEach(() => { + cy.login(); + Cypress.Cookies.preserveOnce('token'); + createCluster.navigateTo(); + createCluster.createCluster(); + cy.get('.nav-link').contains('Create Services').click(); + }); + + it('should check if title contains Create Services', () => { + cy.get('.title').should('contain.text', 'Create Services'); + }); + + describe('when Orchestrator is available', () => { + const serviceName = 'mds.test'; + + it('should create an mds service', () => { + createService('mds', serviceName, '1'); + }); + + it('should edit a service', () => { + const daemonCount = '2'; + createClusterServicePage.editService(serviceName, daemonCount); + createClusterServicePage.expectPlacementCount(serviceName, daemonCount); + }); + + it('should delete mds service', () => { + createClusterServicePage.deleteService('mds.test'); + }); + }); +}); -- cgit v1.2.3