1 import { CreateClusterWizardHelper } from 'cypress/integration/cluster/create-cluster.po';
2 import { HostsPageHelper } from 'cypress/integration/cluster/hosts.po';
3 import { OSDsPageHelper } from 'cypress/integration/cluster/osds.po';
4 import { ServicesPageHelper } from 'cypress/integration/cluster/services.po';
6 describe('when cluster creation is completed', () => {
7 const createCluster = new CreateClusterWizardHelper();
8 const services = new ServicesPageHelper();
9 const serviceName = 'rgw.foo';
13 Cypress.Cookies.preserveOnce('token');
16 it('should redirect to dashboard landing page after cluster creation', () => {
17 createCluster.navigateTo();
18 createCluster.createCluster();
20 cy.get('.nav-link').contains('Review').click();
21 cy.get('button[aria-label="Next"]').click();
22 cy.get('cd-dashboard').should('exist');
25 describe('Hosts page', () => {
26 const hosts = new HostsPageHelper();
28 'ceph-node-00.cephlab.com',
29 'ceph-node-01.cephlab.com',
30 'ceph-node-02.cephlab.com'
37 it('should have removed "_no_schedule" label', () => {
38 for (const hostname of hostnames) {
39 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
43 it('should display inventory', () => {
44 hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
45 cy.get('cd-host-details').within(() => {
46 hosts.getTableCount('total').should('be.gte', 0);
50 it('should display daemons', () => {
51 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
52 cy.get('cd-host-details').within(() => {
53 hosts.getTableCount('total').should('be.gte', 0);
57 it('should check if rgw service is running', () => {
58 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
59 cy.get('cd-host-details').within(() => {
60 services.checkServiceStatus('rgw');
64 it('should force maintenance and exit', { retries: 1 }, () => {
65 hosts.maintenance(hostnames[1], true, true);
69 describe('OSDs page', () => {
70 const osds = new OSDsPageHelper();
76 it('should check if osds are created', { retries: 1 }, () => {
77 osds.getTableCount('total').should('be.gte', 1);
81 describe('Services page', () => {
83 services.navigateTo();
86 it('should check if services are created', () => {
87 services.checkExist(serviceName, true);