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 have removed "_no_schedule" label', () => {
40 for (const hostname of hostnames) {
41 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
45 it('should display inventory', () => {
46 hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
47 cy.get('cd-host-details').within(() => {
48 hosts.getTableCount('total').should('be.gte', 0);
52 it('should display daemons', () => {
53 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
54 cy.get('cd-host-details').within(() => {
55 hosts.getTableCount('total').should('be.gte', 0);
59 it('should check if mon daemon is running on all hosts', () => {
60 for (const hostname of hostnames) {
61 hosts.clickTab('cd-host-details', hostname, 'Daemons');
62 cy.get('cd-host-details').within(() => {
63 services.checkServiceStatus('mon');