import { HostsPageHelper } from './hosts.po';
import { ServicesPageHelper } from './services.po';
-const pages = {
- index: { url: '#/add-storage?welcome=true', id: 'cd-create-cluster' }
-};
-export class CreateClusterWizardHelper extends PageHelper {
- pages = pages;
-
- createCluster() {
- cy.get('cd-create-cluster').should('contain.text', 'Please expand your cluster first');
- cy.get('[name=add-storage]').click();
+export class OnboardingHelper extends PageHelper {
+ pages = { index: { url: '#/add-storage?welcome=true', id: 'cd-create-cluster' } };
+
+ onboarding() {
+ cy.get('cd-create-cluster').should('contain.text', 'Welcome to Ceph Dashboard');
+ cy.get('[aria-label="Add Storage"]').first().click({ force: true });
cy.get('cd-wizard').should('exist');
}
doSkip() {
- cy.get('[name=skip-cluster-creation]').click();
+ cy.get('[aria-label="View cluster overview"]').first().click({ force: true });
cy.contains('cd-modal button', 'Continue').click();
- cy.get('cd-dashboard').should('exist');
+ cy.get('cd-overview').should('exist');
const notification = new NotificationSidebarPageHelper();
notification.open();
notification.getNotifications().should('contain', 'Storage setup skipped by user');
export class CreateClusterHostPageHelper extends HostsPageHelper {
pages = {
- index: { url: '#/add-storage?welcome=true', id: 'cd-wizard' },
+ index: { url: '#/add-storage', id: 'cd-create-cluster' },
add: { url: '', id: 'cd-host-form' }
};
export class CreateClusterServicePageHelper extends ServicesPageHelper {
pages = {
- index: { url: '#/add-storage?welcome=true', id: 'cd-wizard' },
+ index: { url: '#/add-storage', id: 'cd-create-cluster' },
create: { url: '', id: 'cd-service-form' }
};
/* tslint:disable*/
-import {
- CreateClusterServicePageHelper,
- CreateClusterWizardHelper
-} from '../../cluster/create-cluster.po';
+import { CreateClusterServicePageHelper, OnboardingHelper } from '../../cluster/create-cluster.po';
/* tslint:enable*/
describe('Create cluster create services page', () => {
- const createCluster = new CreateClusterWizardHelper();
+ const onboardingPage = new OnboardingHelper();
const createClusterServicePage = new CreateClusterServicePageHelper();
const createService = (serviceType: string, serviceName: string, count = 1) => {
beforeEach(() => {
cy.login();
- createCluster.navigateTo();
- createCluster.createCluster();
+ onboardingPage.navigateTo();
+ onboardingPage.onboarding();
cy.get('cd-wizard').within(() => {
cy.get('button').contains('Create Services').click();
/* tslint:disable*/
-import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
+import { OnboardingHelper } from '../../cluster/create-cluster.po';
import { OSDsPageHelper } from '../../cluster/osds.po';
/* tslint:enable*/
const osds = new OSDsPageHelper();
-describe('Create cluster create osds page', () => {
- const createCluster = new CreateClusterWizardHelper();
+describe('Add storage - create osds page', () => {
+ const onboarding = new OnboardingHelper();
beforeEach(() => {
cy.login();
- createCluster.navigateTo();
- createCluster.createCluster();
+ onboarding.navigateTo();
+ onboarding.onboarding();
cy.get('cd-wizard').within(() => {
cy.get('button').contains('Create OSDs').click();
});
cy.get('button').contains('Review').click();
});
cy.get('button[aria-label="Next"]').click();
- cy.get('cd-dashboard').should('exist');
- createCluster.navigateTo();
- createCluster.createCluster();
+ cy.get('cd-overview').should('exist');
+ onboarding.navigateTo();
+ onboarding.onboarding();
cy.get('cd-wizard').within(() => {
cy.get('button').contains('Create OSDs').click();
});
/* tslint:disable*/
-import {
- CreateClusterHostPageHelper,
- CreateClusterWizardHelper
-} from '../../cluster/create-cluster.po';
+import { CreateClusterHostPageHelper, OnboardingHelper } from '../../cluster/create-cluster.po';
/* tslint:enable*/
describe('Create Cluster Review page', () => {
- const createCluster = new CreateClusterWizardHelper();
+ const onboarding = new OnboardingHelper();
const createClusterHostPage = new CreateClusterHostPageHelper();
beforeEach(() => {
cy.login();
- createCluster.navigateTo();
- createCluster.createCluster();
+ onboarding.navigateTo();
+ onboarding.onboarding();
cy.get('cd-wizard').within(() => {
cy.get('button').contains('Review').click();
describe('fields check', () => {
it('should check cluster resources table is present', () => {
// check for table header 'Cluster Resources'
- createCluster.getLegends().its(0).should('have.text', 'Cluster Resources');
+ onboarding.getLegends().its(0).should('have.text', 'Cluster Resources');
// check for fields in table
- createCluster.getStatusTables().should('contain.text', 'Hosts');
- createCluster.getStatusTables().should('contain.text', 'Storage Capacity');
- createCluster.getStatusTables().should('contain.text', 'CPUs');
- createCluster.getStatusTables().should('contain.text', 'Memory');
+ onboarding.getStatusTables().should('contain.text', 'Hosts');
+ onboarding.getStatusTables().should('contain.text', 'Storage Capacity');
+ onboarding.getStatusTables().should('contain.text', 'CPUs');
+ onboarding.getStatusTables().should('contain.text', 'Memory');
});
it('should check Host Details table is present', () => {
// check for there to be two tables
- createCluster.getDataTables().should('have.length', 1);
+ onboarding.getDataTables().should('have.length', 1);
// verify correct columns on Host Details table
- createCluster.getDataTableHeaders().contains('Hostname');
+ onboarding.getDataTableHeaders().contains('Hostname');
- createCluster.getDataTableHeaders().contains('Labels');
+ onboarding.getDataTableHeaders().contains('Labels');
- createCluster.getDataTableHeaders().contains('CPUs');
+ onboarding.getDataTableHeaders().contains('CPUs');
- createCluster.getDataTableHeaders().contains('Cores');
+ onboarding.getDataTableHeaders().contains('Cores');
- createCluster.getDataTableHeaders().contains('Total Memory');
+ onboarding.getDataTableHeaders().contains('Total Memory');
- createCluster.getDataTableHeaders().contains('Raw Capacity');
+ onboarding.getDataTableHeaders().contains('Raw Capacity');
- createCluster.getDataTableHeaders().contains('HDDs');
+ onboarding.getDataTableHeaders().contains('HDDs');
- createCluster.getDataTableHeaders().contains('Flash');
+ onboarding.getDataTableHeaders().contains('Flash');
- createCluster.getDataTableHeaders().contains('NICs');
+ onboarding.getDataTableHeaders().contains('NICs');
});
it('should check default host name is present', () => {
/* tslint:disable*/
-import { CreateClusterWizardHelper } from '../../cluster/create-cluster.po';
+import { OnboardingHelper } from '../../cluster/create-cluster.po';
import { HostsPageHelper } from '../../cluster/hosts.po';
import { ServicesPageHelper } from '../../cluster/services.po';
/* tslint:enable*/
describe('when cluster creation is completed', () => {
- const createCluster = new CreateClusterWizardHelper();
+ const onboarding = new OnboardingHelper();
const services = new ServicesPageHelper();
const hosts = new HostsPageHelper();
cy.login();
});
- it('should redirect to dashboard landing page after cluster creation', () => {
- createCluster.navigateTo();
- createCluster.createCluster();
+ it('should redirect to overview landing page after adding storage', () => {
+ onboarding.navigateTo();
+ onboarding.onboarding();
// Explicitly skip OSD Creation Step so that it prevents from
// deploying OSDs to the hosts automatically.
cy.get('button').contains('Review').click();
});
cy.get('button[aria-label="Next"]').click();
- cy.get('cd-dashboard').should('exist');
+ cy.get('cd-overview').should('exist');
});
describe('Hosts page', () => {
}
if (this.simpleDeployment) {
- const title = this.deploymentOption?.options[this.selectedOption['option']].title;
+ const title = this.deploymentOption?.options[this.selectedOption['option']]?.title;
const trackingId = $localize`${title} deployment`;
this.taskWrapper
.wrapTaskAroundCall({