]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / workflow / 06-cluster-check.e2e-spec.ts
1 import { CreateClusterWizardHelper } from 'cypress/integration/cluster/create-cluster.po';
2 import { HostsPageHelper } from 'cypress/integration/cluster/hosts.po';
3 import { ServicesPageHelper } from 'cypress/integration/cluster/services.po';
4
5 describe('when cluster creation is completed', () => {
6 const createCluster = new CreateClusterWizardHelper();
7 const services = new ServicesPageHelper();
8 const hosts = new HostsPageHelper();
9
10 const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
11
12 beforeEach(() => {
13 cy.login();
14 Cypress.Cookies.preserveOnce('token');
15 });
16
17 it('should redirect to dashboard landing page after cluster creation', () => {
18 createCluster.navigateTo();
19 createCluster.createCluster();
20
21 cy.get('.nav-link').contains('Review').click();
22 cy.get('button[aria-label="Next"]').click();
23 cy.get('cd-dashboard').should('exist');
24 });
25
26 describe('Hosts page', () => {
27 beforeEach(() => {
28 hosts.navigateTo();
29 });
30
31 it('should have removed "_no_schedule" label', () => {
32 for (const hostname of hostnames) {
33 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
34 }
35 });
36
37 it('should display inventory', () => {
38 hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
39 cy.get('cd-host-details').within(() => {
40 hosts.getTableCount('total').should('be.gte', 0);
41 });
42 });
43
44 it('should display daemons', () => {
45 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
46 cy.get('cd-host-details').within(() => {
47 hosts.getTableCount('total').should('be.gte', 0);
48 });
49 });
50
51 it('should check if mon daemon is running on all hosts', () => {
52 for (const hostname of hostnames) {
53 hosts.clickTab('cd-host-details', hostname, 'Daemons');
54 cy.get('cd-host-details').within(() => {
55 services.checkServiceStatus('mon');
56 });
57 }
58 });
59 });
60 });