-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e50574
commit ce9ccfc
Showing
14 changed files
with
194 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import EmberComponentPo from '@/cypress/e2e/po/components/ember/ember-component.po'; | ||
|
||
export default class EmberAccordionPo extends EmberComponentPo { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import ComponentPo from '@/cypress/e2e/po/components/component.po'; | ||
|
||
export default class EmberComponentPo extends ComponentPo { | ||
self = () => { | ||
return cy.iFrame().find(this.selector); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import EmberComponentPo from '@/cypress/e2e/po/components/ember/ember-component.po'; | ||
|
||
export default class EmberInputPo extends EmberComponentPo { | ||
/** | ||
* Type value in the input | ||
* @param value Value to be typed | ||
* @returns | ||
*/ | ||
set(value: string): Cypress.Chainable { | ||
this.input().should('be.visible'); | ||
this.input().focus(); | ||
this.input().clear(); | ||
|
||
return this.input().type(value); | ||
} | ||
|
||
clear() { | ||
return this.input().clear(); | ||
} | ||
|
||
/** | ||
* Return the input HTML element from given container | ||
* @returns HTML Element | ||
*/ | ||
private input(): Cypress.Chainable { | ||
return this.self().find('input'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
cypress/e2e/po/detail/provisioning.cattle.io.cluster/cluster-detail-rke1-custom.po.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import ClusterManagerDetailPagePo from '@/cypress/e2e/po/detail/provisioning.cattle.io.cluster/cluster-detail.po'; | ||
|
||
/** | ||
* Detail page for an RKE2 custom cluster | ||
*/ | ||
export default class ClusterManagerDetailRke1CustomPagePo extends ClusterManagerDetailPagePo { | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create-rke1-custom.po.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import PagePo from '@/cypress/e2e/po/pages/page.po'; | ||
import ClusterManagerCreatePagePo from '@/cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create.po'; | ||
import EmberInputPo from '@/cypress/e2e/po/components/ember/ember-input.po'; | ||
import ClusterManagerCreateRKE1PagePo from '@/cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create-rke1.po'; | ||
import EmberAccordionPo from '@/cypress/e2e/po/components/ember/ember-accordion.po'; | ||
|
||
/** | ||
* Create page for an RKE1 custom cluster | ||
*/ | ||
export default class ClusterManagerCreateRke1CustomPagePo extends ClusterManagerCreateRKE1PagePo { | ||
static url: string = `${ ClusterManagerCreatePagePo.url }/create?type=custom` | ||
static goTo(): Cypress.Chainable<Cypress.AUTWindow> { | ||
return PagePo.goTo(ClusterManagerCreateRke1CustomPagePo.url); | ||
} | ||
|
||
goToCustomClusterCreation(): Cypress.Chainable<Cypress.AUTWindow> { | ||
return PagePo.goTo(`${ ClusterManagerCreatePagePo.url }?type=custom`); | ||
} | ||
|
||
clusterName(): EmberInputPo { | ||
return new EmberInputPo('div[data-testid="form-name-description__name"]'); | ||
} | ||
|
||
nodeCommand(): EmberAccordionPo { | ||
return new EmberAccordionPo('.cluster-driver__role'); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create-rke1.po.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import ToggleSwitchPo from '@/cypress/e2e/po/components/toggle-switch.po'; | ||
import ClusterManagerCreatePagePo from '@/cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create.po'; | ||
import NameNsDescription from '~/cypress/e2e/po/components/name-ns-description.po'; | ||
import ResourceDetailPo from '~/cypress/e2e/po/edit/resource-detail.po'; | ||
import { CypressChainable } from '~/cypress/e2e/po/po.types'; | ||
|
||
/** | ||
* TODO: RC | ||
*/ | ||
export default abstract class ClusterManagerCreateRKE1PagePo extends ClusterManagerCreatePagePo { | ||
static url: string = '/c/local/manager/provisioning.cattle.io.cluster/create' | ||
|
||
// Form | ||
nameNsDescription(): NameNsDescription { | ||
throw new Error('RKE2 only'); | ||
} | ||
|
||
create(): CypressChainable { | ||
throw new Error('RKE2 only'); | ||
} | ||
|
||
save(): CypressChainable { | ||
throw new Error('RKE2 only'); | ||
} | ||
|
||
next() { | ||
return cy.iFrame().find('button').contains('Next').click(); | ||
} | ||
|
||
done() { | ||
return cy.iFrame().find('button').contains('Done').click(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create-rke2-custom.po.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters