1 import { HostsPageHelper } from 'cypress/integration/cluster/hosts.po';
2 import { ServicesPageHelper } from 'cypress/integration/cluster/services.po';
3 import { PageHelper } from 'cypress/integration/page-helper.po';
4 import { NotificationSidebarPageHelper } from 'cypress/integration/ui/notification.po';
7 index: { url: '#/expand-cluster', id: 'cd-create-cluster' }
9 export class CreateClusterWizardHelper extends PageHelper {
13 cy.get('cd-create-cluster').should('contain.text', 'Please expand your cluster first');
14 cy.get('[name=expand-cluster]').click();
15 cy.get('cd-wizard').should('exist');
19 cy.get('[name=skip-cluster-creation]').click();
20 cy.contains('cd-modal button', 'Continue').click();
22 cy.get('cd-dashboard').should('exist');
23 const notification = new NotificationSidebarPageHelper();
25 notification.getNotifications().should('contain', 'Cluster expansion skipped by user');
28 createOSD(deviceType: 'hdd' | 'ssd') {
29 // Click Primary devices Add button
30 cy.get('cd-osd-devices-selection-groups[name="Primary"]').as('primaryGroups');
31 cy.get('@primaryGroups').find('button').click();
33 // Select all devices with `deviceType`
34 cy.get('cd-osd-devices-selection-modal').within(() => {
35 cy.get('.modal-footer .tc_submitButton').as('addButton').should('be.disabled');
36 this.filterTable('Type', deviceType);
37 this.getTableCount('total').should('be.gte', 1);
38 cy.get('@addButton').click();
43 export class CreateClusterHostPageHelper extends HostsPageHelper {
45 index: { url: '#/expand-cluster', id: 'cd-wizard' },
46 add: { url: '', id: 'cd-host-form' }
57 export class CreateClusterServicePageHelper extends ServicesPageHelper {
59 index: { url: '#/expand-cluster', id: 'cd-wizard' },
60 create: { url: '', id: 'cd-service-form' }