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';
5 describe('when cluster creation is completed', () => {
6 const createCluster = new CreateClusterWizardHelper();
7 const services = new ServicesPageHelper();
8 const hosts = new HostsPageHelper();
10 const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
14 Cypress.Cookies.preserveOnce('token');
17 it('should redirect to dashboard landing page after cluster creation', () => {
18 createCluster.navigateTo();
19 createCluster.createCluster();
21 cy.get('.nav-link').contains('Review').click();
22 cy.get('button[aria-label="Next"]').click();
23 cy.get('cd-dashboard').should('exist');
26 describe('Hosts page', () => {
31 it('should have removed "_no_schedule" label', () => {
32 for (const hostname of hostnames) {
33 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
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);
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);
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');