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 cy.get('.nav-link').contains('Review').click();
24 cy.get('button[aria-label="Next"]').click();
25 cy.get('cd-dashboard').should('exist');
28 describe('Hosts page', () => {
33 it('should add one more host', () => {
34 hosts.navigateTo('add');
35 hosts.add(hostnames[3]);
36 hosts.checkExist(hostnames[3], true);
39 it('should check if monitoring stacks are running on the root host', { retries: 2 }, () => {
40 const monitoringStack = ['alertmanager', 'grafana', 'node-exporter', 'prometheus'];
41 hosts.clickTab('cd-host-details', 'ceph-node-00', 'Daemons');
42 for (const daemon of monitoringStack) {
43 cy.get('cd-host-details').within(() => {
44 services.checkServiceStatus(daemon);
49 it('should have removed "_no_schedule" label', () => {
50 for (const hostname of hostnames) {
51 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
55 it('should display inventory', () => {
56 hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
57 cy.get('cd-host-details').within(() => {
58 hosts.getTableCount('total').should('be.gte', 0);
62 it('should display daemons', () => {
63 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
64 cy.get('cd-host-details').within(() => {
65 hosts.getTableCount('total').should('be.gte', 0);
69 it('should check if mon daemon is running on all hosts', () => {
70 for (const hostname of hostnames) {
71 hosts.clickTab('cd-host-details', hostname, 'Daemons');
72 cy.get('cd-host-details').within(() => {
73 services.checkServiceStatus('mon');