-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes test-case: "Selecting external partner integrations checkbox enables custom manifests as well" Reporting: "AssertionError: Timed out retrying after 4000ms: expected '<input#form-input-addCustomManifest-field.pf-c-check__input>' to be 'checked'"
- Loading branch information
Showing
13 changed files
with
222 additions
and
132 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
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
40 changes: 40 additions & 0 deletions
40
libs/ui-lib-tests/cypress/views/forms/ClusterDetails/ClusterDetailsForm.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,40 @@ | ||
import { BaseDomainField } from './Fields/BaseDomainField'; | ||
import { ClusterNameField } from './Fields/ClusterNameField'; | ||
import { CustomManifestsField } from './Fields/CustomManifestsField'; | ||
import { ExternalPartnerIntegrationsField } from './Fields/ExternalPartnerIntegrationsField'; | ||
import { HostsNetworkConfigurationField } from './Fields/HostsNetworkConfigurationField'; | ||
import { OpenShiftVersionField } from './Fields/OpenShiftVersionField'; | ||
|
||
export class ClusterDetailsForm { | ||
static readonly alias = `@${ClusterDetailsForm.name}`; | ||
static readonly selector = '#wizard-cluster-details__form'; | ||
|
||
static init(ancestorAlias?: string) { | ||
cy.findWithinOrGet(ClusterDetailsForm.selector, ancestorAlias).as(ClusterDetailsForm.name); | ||
return ClusterDetailsForm; | ||
} | ||
|
||
static get externalPartnerIntegrationsField() { | ||
return ExternalPartnerIntegrationsField.init(ClusterDetailsForm.alias); | ||
} | ||
|
||
static get customManifestsField() { | ||
return CustomManifestsField.init(ClusterDetailsForm.alias); | ||
} | ||
|
||
static get clusterNameField() { | ||
return ClusterNameField.init(ClusterDetailsForm.alias); | ||
} | ||
|
||
static get baseDomainField() { | ||
return BaseDomainField.init(ClusterDetailsForm.alias); | ||
} | ||
|
||
static get openshiftVersionField() { | ||
return OpenShiftVersionField.init(ClusterDetailsForm.alias); | ||
} | ||
|
||
static get hostsNetworkConfigurationField() { | ||
return HostsNetworkConfigurationField.init(ClusterDetailsForm.alias); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
libs/ui-lib-tests/cypress/views/forms/ClusterDetails/Fields/BaseDomainField.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,15 @@ | ||
export class BaseDomainField { | ||
static readonly alias = `${BaseDomainField.name}`; | ||
static readonly selector = '#form-control__form-input-baseDnsDomain-field'; | ||
|
||
static init(ancestorAlias: string) { | ||
cy.findWithinOrGet(BaseDomainField.selector, ancestorAlias).as(BaseDomainField.name); | ||
return BaseDomainField; | ||
} | ||
|
||
static findInputField() { | ||
return cy.get(BaseDomainField.alias).findByRole('textbox', { | ||
name: /base domain/i, | ||
}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
libs/ui-lib-tests/cypress/views/forms/ClusterDetails/Fields/ClusterNameField.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,15 @@ | ||
export class ClusterNameField { | ||
static readonly alias = `@${ClusterNameField}`; | ||
static readonly selector = '#form-control__form-input-name-field'; | ||
|
||
static init(ancestorAlias?: string) { | ||
cy.findWithinOrGet(ClusterNameField.selector, ancestorAlias).as(ClusterNameField.name); | ||
return ClusterNameField; | ||
} | ||
|
||
static findInputField() { | ||
return cy.get(ClusterNameField.alias).findByRole('textbox', { | ||
name: /cluster name/i, | ||
}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
libs/ui-lib-tests/cypress/views/forms/ClusterDetails/Fields/CustomManifestsField.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,15 @@ | ||
export class CustomManifestsField { | ||
static readonly alias = `@${CustomManifestsField.name}`; | ||
static readonly selector = '#form-control__form-input-addCustomManifest-field'; | ||
|
||
static init(ancestorAlias?: string) { | ||
cy.findWithinOrGet(CustomManifestsField.selector, ancestorAlias).as(CustomManifestsField.name); | ||
return CustomManifestsField; | ||
} | ||
|
||
static findCheckbox() { | ||
return cy.get(CustomManifestsField.alias).findByRole('checkbox', { | ||
name: /include custom manifests/i, | ||
}); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...i-lib-tests/cypress/views/forms/ClusterDetails/Fields/ExternalPartnerIntegrationsField.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,44 @@ | ||
export class ExternalPartnerIntegrationsField { | ||
static readonly alias = `@${ExternalPartnerIntegrationsField.name}`; | ||
static readonly selector = '#form-control__form-checkbox-externalPartnerIntegrations-field'; | ||
|
||
static init(ancestorAlias?: string) { | ||
cy.findWithinOrGet(ExternalPartnerIntegrationsField.selector, ancestorAlias).as( | ||
ExternalPartnerIntegrationsField.name, | ||
); | ||
return ExternalPartnerIntegrationsField; | ||
} | ||
|
||
static findPopoverButton() { | ||
return cy.get(ExternalPartnerIntegrationsField.alias).findByRole('img', { | ||
hidden: true, | ||
}); | ||
} | ||
|
||
static findPopoverContent() { | ||
// The popover is attached to the bottom of the body by default. | ||
// No need to search anything related to it within this form field. | ||
return cy | ||
.get('#popover-externalPartnerIntegrations-body') | ||
.findByText( | ||
/to integrate with an external partner \(for example, oracle cloud\), you'll need to provide a custom manifest\./i, | ||
); | ||
} | ||
static findLabel() { | ||
return cy | ||
.get(ExternalPartnerIntegrationsField.alias) | ||
.findByText(/external partner integrations/i); | ||
} | ||
|
||
static findHelperText() { | ||
return cy | ||
.get(ExternalPartnerIntegrationsField.alias) | ||
.findByText(/integrate with other platforms using custom manifests\./i); | ||
} | ||
|
||
static findCheckbox() { | ||
return cy.get(ExternalPartnerIntegrationsField.alias).findByRole('checkbox', { | ||
name: /external partner integrations/i, | ||
}); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
.../ui-lib-tests/cypress/views/forms/ClusterDetails/Fields/HostsNetworkConfigurationField.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 @@ | ||
export class HostsNetworkConfigurationField { | ||
static readonly alias = `@${HostsNetworkConfigurationField.name}`; | ||
static readonly selector = '#form-control__form-radio-hostsNetworkConfigurationType-field'; | ||
|
||
static init(ancestorAlias?: string) { | ||
cy.findWithinOrGet(HostsNetworkConfigurationField.selector, ancestorAlias).as( | ||
HostsNetworkConfigurationField.name, | ||
); | ||
return HostsNetworkConfigurationField; | ||
} | ||
|
||
static findLabel() { | ||
return cy.get(HostsNetworkConfigurationField.alias).findByText(/hosts' network configuration/i); | ||
} | ||
|
||
static findStaticIpRadioButton() { | ||
return cy | ||
.get(HostsNetworkConfigurationField.alias) | ||
.find('#form-radio-hostsNetworkConfigurationType-static-field'); | ||
} | ||
|
||
static findStaticIpRadioLabel() { | ||
return cy | ||
.get(HostsNetworkConfigurationField.alias) | ||
.findByText(/static ip, bridges, and bonds/i); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
libs/ui-lib-tests/cypress/views/forms/ClusterDetails/Fields/OpenShiftVersionField.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 @@ | ||
export class OpenShiftVersionField { | ||
static readonly alias = `@${OpenShiftVersionField.name}`; | ||
static readonly selector = '#form-control__form-input-openshiftVersion-field'; | ||
|
||
static init(ancestorAlias?: string) { | ||
cy.findWithinOrGet(OpenShiftVersionField.selector, ancestorAlias).as( | ||
OpenShiftVersionField.name, | ||
); | ||
|
||
return OpenShiftVersionField; | ||
} | ||
|
||
static findLabel() { | ||
return cy.get(OpenShiftVersionField.alias).findByText(/openshift version/i); | ||
} | ||
|
||
static findDropdown() { | ||
return cy.get(OpenShiftVersionField.alias).find('#form-input-openshiftVersion-field'); | ||
} | ||
|
||
static selectVersion(version: string) { | ||
OpenShiftVersionField.findDropdown().click(); | ||
OpenShiftVersionField.findDropdown().within(() => { | ||
cy.findByRole('menuitem', { name: new RegExp(`openshift ${version}`, 'i') }).click(); | ||
}); | ||
} | ||
} |
Oops, something went wrong.