]>
Commit | Line | Data |
---|---|---|
2a845540 TL |
1 | import { PageHelper } from '../page-helper.po'; |
2 | import { NotificationSidebarPageHelper } from '../ui/notification.po'; | |
3 | import { HostsPageHelper } from './hosts.po'; | |
4 | import { ServicesPageHelper } from './services.po'; | |
a4b75251 TL |
5 | |
6 | const pages = { | |
7 | index: { url: '#/expand-cluster', id: 'cd-create-cluster' } | |
8 | }; | |
9 | export 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 | ||
29 | export 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 | ||
43 | export 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 | } |