2 import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
3 import { HostsPageHelper } from '../../cluster/hosts.po';
4 import { ServicesPageHelper } from '../../cluster/services.po';
7 describe('when cluster creation is completed', () => {
8 const createCluster = new CreateClusterWizardHelper();
9 const services = new ServicesPageHelper();
10 const hosts = new HostsPageHelper();
12 const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
16 Cypress.Cookies.preserveOnce('token');
19 it('should redirect to dashboard landing page after cluster creation', () => {
20 createCluster.navigateTo();
21 createCluster.createCluster();
23 // Explicitly skip OSD Creation Step so that it prevents from
24 // deploying OSDs to the hosts automatically.
25 cy.get('.nav-link').contains('Create OSDs').click();
26 cy.get('button[aria-label="Skip this step"]').click();
28 cy.get('.nav-link').contains('Review').click();
29 cy.get('button[aria-label="Next"]').click();
30 cy.get('cd-dashboard').should('exist');
33 describe('Hosts page', () => {
38 it('should add one more host', () => {
39 hosts.navigateTo('add');
40 hosts.add(hostnames[3]);
41 hosts.checkExist(hostnames[3], true);
44 it('should check if monitoring stacks are running on the root host', { retries: 2 }, () => {
45 const monitoringStack = ['alertmanager', 'grafana', 'node-exporter', 'prometheus'];
46 hosts.clickTab('cd-host-details', 'ceph-node-00', 'Daemons');
47 for (const daemon of monitoringStack) {
48 cy.get('cd-host-details').within(() => {
49 services.checkServiceStatus(daemon);
54 it('should have removed "_no_schedule" label', () => {
55 for (const hostname of hostnames) {
56 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
60 it('should display inventory', () => {
61 hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
62 cy.get('cd-host-details').within(() => {
63 hosts.getTableCount('total').should('be.gte', 0);
67 it('should display daemons', () => {
68 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
69 cy.get('cd-host-details').within(() => {
70 hosts.getTableCount('total').should('be.gte', 0);
74 it('should check if mon daemon is running on all hosts', () => {
75 for (const hostname of hostnames) {
76 hosts.clickTab('cd-host-details', hostname, 'Daemons');
77 cy.get('cd-host-details').within(() => {
78 services.checkServiceStatus('mon');