]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/create-cluster.po.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / e2e / cluster / create-cluster.po.ts
CommitLineData
2a845540
TL
1import { PageHelper } from '../page-helper.po';
2import { NotificationSidebarPageHelper } from '../ui/notification.po';
3import { HostsPageHelper } from './hosts.po';
4import { ServicesPageHelper } from './services.po';
a4b75251
TL
5
6const pages = {
7 index: { url: '#/expand-cluster', id: 'cd-create-cluster' }
8};
9export class CreateClusterWizardHelper extends PageHelper {
10 pages = pages;
11
12 createCluster() {
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');
16 }
17
18 doSkip() {
19 cy.get('[name=skip-cluster-creation]').click();
20 cy.contains('cd-modal button', 'Continue').click();
21
22 cy.get('cd-dashboard').should('exist');
23 const notification = new NotificationSidebarPageHelper();
24 notification.open();
25 notification.getNotifications().should('contain', 'Cluster expansion skipped by user');
26 }
a4b75251
TL
27}
28
29export class CreateClusterHostPageHelper extends HostsPageHelper {
30 pages = {
31 index: { url: '#/expand-cluster', id: 'cd-wizard' },
32 add: { url: '', id: 'cd-host-form' }
33 };
34
35 columnIndex = {
36 hostname: 1,
37 labels: 2,
38 status: 3,
39 services: 0
40 };
41}
42
43export class CreateClusterServicePageHelper extends ServicesPageHelper {
44 pages = {
45 index: { url: '#/expand-cluster', id: 'cd-wizard' },
46 create: { url: '', id: 'cd-service-form' }
47 };
48
49 columnIndex = {
50 service_name: 1,
51 placement: 2,
52 running: 0,
53 size: 0,
54 last_refresh: 0
55 };
56}