fix identity test (#21312)
* fix identity test * crazy that this fixes it
This commit is contained in:
parent
8323e91f56
commit
a6c85439c9
8 changed files with 49 additions and 36 deletions
|
@ -14,7 +14,7 @@ export default class AttributesTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
public addAttribute(key: string, value: string) {
|
public addAttribute(key: string, value: string) {
|
||||||
cy.findByTestId(this.addAttributeBtn).click();
|
this.addAnAttributeButton();
|
||||||
|
|
||||||
cy.findAllByTestId(this.keyInput)
|
cy.findAllByTestId(this.keyInput)
|
||||||
.its("length")
|
.its("length")
|
||||||
|
@ -42,6 +42,7 @@ export default class AttributesTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
public addAnAttributeButton() {
|
public addAnAttributeButton() {
|
||||||
|
cy.wait(1000);
|
||||||
cy.findByTestId(this.addAttributeBtn).click();
|
cy.findByTestId(this.addAttributeBtn).click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,8 +82,8 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected assertCommonRequiredFields(requiredFiels: string[]) {
|
protected assertCommonRequiredFields(requiredFields: string[]) {
|
||||||
requiredFiels.forEach((elementLocator) => {
|
requiredFields.forEach((elementLocator) => {
|
||||||
if (elementLocator.includes("#")) {
|
if (elementLocator.includes("#")) {
|
||||||
cy.get(elementLocator)
|
cy.get(elementLocator)
|
||||||
.parent()
|
.parent()
|
||||||
|
|
|
@ -4,15 +4,19 @@ const additionalUsersProfile_input_test_value =
|
||||||
"additionalUsersProfile_input_test_value";
|
"additionalUsersProfile_input_test_value";
|
||||||
|
|
||||||
export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
||||||
private additionalUsersProfileFieldsInput = "#facebookFetchedFields";
|
private additionalUsersProfileFieldsInput = "fetchedFields";
|
||||||
|
|
||||||
public typeAdditionalUsersProfileFieldsInput(value: string) {
|
public typeAdditionalUsersProfileFieldsInput(value: string) {
|
||||||
cy.get(this.additionalUsersProfileFieldsInput).type(value).blur();
|
cy.findByTestId(this.additionalUsersProfileFieldsInput).type(value);
|
||||||
|
cy.findByTestId(this.additionalUsersProfileFieldsInput).blur();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertAdditionalUsersProfileFieldsInputEqual(value: string) {
|
public assertAdditionalUsersProfileFieldsInputEqual(value: string) {
|
||||||
cy.get(this.additionalUsersProfileFieldsInput).should("have.value", value);
|
cy.findByTestId(this.additionalUsersProfileFieldsInput).should(
|
||||||
|
"have.value",
|
||||||
|
value
|
||||||
|
);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,26 +4,28 @@ const base_url_input_test_value = "base_url_input_test_value";
|
||||||
const api_url_input_test_value = "api_url_input_test_value";
|
const api_url_input_test_value = "api_url_input_test_value";
|
||||||
|
|
||||||
export default class ProviderGithubGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
export default class ProviderGithubGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
||||||
private baseUrlInput = "#baseUrl";
|
private baseUrlInput = "baseUrl";
|
||||||
private apiUrlInput = "#apiUrl";
|
private apiUrlInput = "apiUrl";
|
||||||
|
|
||||||
public typeBaseUrlInput(value: string) {
|
public typeBaseUrlInput(value: string) {
|
||||||
cy.get(this.baseUrlInput).type(value).blur();
|
cy.findByTestId(this.baseUrlInput).type(value);
|
||||||
|
cy.findByTestId(this.baseUrlInput).blur();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public typeApiUrlInput(value: string) {
|
public typeApiUrlInput(value: string) {
|
||||||
cy.get(this.apiUrlInput).type(value).blur();
|
cy.findByTestId(this.apiUrlInput).type(value);
|
||||||
|
cy.findByTestId(this.apiUrlInput).blur();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertBaseUrlInputInputEqual(value: string) {
|
public assertBaseUrlInputInputEqual(value: string) {
|
||||||
cy.get(this.baseUrlInput).should("have.value", value);
|
cy.findByTestId(this.baseUrlInput).should("have.value", value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertApiUrlInputEqual(value: string) {
|
public assertApiUrlInputEqual(value: string) {
|
||||||
cy.get(this.apiUrlInput).should("have.value", value);
|
cy.findByTestId(this.apiUrlInput).should("have.value", value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,37 +3,41 @@ import ProviderBaseGeneralSettingsPage from "../ProviderBaseGeneralSettingsPage"
|
||||||
const hosted_domain_input_test_value = "hosted_domain_input_test_value";
|
const hosted_domain_input_test_value = "hosted_domain_input_test_value";
|
||||||
|
|
||||||
export default class ProviderGoogleGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
export default class ProviderGoogleGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
||||||
private hostedDomainInput = "#googleHostedDomain";
|
private hostedDomainInput = "hostedDomain";
|
||||||
private useUserIpParamSwitch = "#googleUserIp";
|
private useUserIpParamSwitch = "userIp";
|
||||||
private requestRefreshTokenSwitch = "#googleOfflineAccess";
|
private requestRefreshTokenSwitch = "offlineAccess";
|
||||||
|
|
||||||
public typeHostedDomainInput(value: string) {
|
public typeHostedDomainInput(value: string) {
|
||||||
cy.get(this.hostedDomainInput).type(value).blur();
|
cy.findByTestId(this.hostedDomainInput).type(value);
|
||||||
|
cy.findByTestId(this.hostedDomainInput).blur();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public clickUseUserIpParamSwitch() {
|
public clickUseUserIpParamSwitch() {
|
||||||
cy.get(this.useUserIpParamSwitch).parent().click();
|
cy.findByTestId(this.useUserIpParamSwitch).parent().click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public clickRequestRefreshTokenSwitch() {
|
public clickRequestRefreshTokenSwitch() {
|
||||||
cy.get(this.requestRefreshTokenSwitch).parent().click();
|
cy.findByTestId(this.requestRefreshTokenSwitch).parent().click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertHostedDomainInputEqual(value: string) {
|
public assertHostedDomainInputEqual(value: string) {
|
||||||
cy.get(this.hostedDomainInput).should("have.value", value);
|
cy.findByTestId(this.hostedDomainInput).should("have.value", value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertUseUserIpParamSwitchTurnedOn(isOn: boolean) {
|
public assertUseUserIpParamSwitchTurnedOn(isOn: boolean) {
|
||||||
super.assertSwitchStateOn(cy.get(this.useUserIpParamSwitch), isOn);
|
super.assertSwitchStateOn(cy.findByTestId(this.useUserIpParamSwitch), isOn);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertRequestRefreshTokenSwitchTurnedOn(isOn: boolean) {
|
public assertRequestRefreshTokenSwitchTurnedOn(isOn: boolean) {
|
||||||
super.assertSwitchStateOn(cy.get(this.requestRefreshTokenSwitch), isOn);
|
super.assertSwitchStateOn(
|
||||||
|
cy.findByTestId(this.requestRefreshTokenSwitch),
|
||||||
|
isOn
|
||||||
|
);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +52,8 @@ export default class ProviderGoogleGeneralSettings extends ProviderBaseGeneralSe
|
||||||
public assertFilledDataEqual(idpName: string) {
|
public assertFilledDataEqual(idpName: string) {
|
||||||
this.assertCommonFilledDataEqual(idpName);
|
this.assertCommonFilledDataEqual(idpName);
|
||||||
this.assertHostedDomainInputEqual(hosted_domain_input_test_value);
|
this.assertHostedDomainInputEqual(hosted_domain_input_test_value);
|
||||||
this.assertSwitchStateOn(cy.get(this.useUserIpParamSwitch));
|
this.assertSwitchStateOn(cy.findByTestId(this.useUserIpParamSwitch));
|
||||||
this.assertSwitchStateOn(cy.get(this.requestRefreshTokenSwitch));
|
this.assertSwitchStateOn(cy.findByTestId(this.requestRefreshTokenSwitch));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,20 +3,20 @@ import ProviderBaseGeneralSettingsPage from "../ProviderBaseGeneralSettingsPage"
|
||||||
const base_url_input_test_value = "base_url_input_test_value";
|
const base_url_input_test_value = "base_url_input_test_value";
|
||||||
|
|
||||||
export default class ProviderOpenshiftGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
export default class ProviderOpenshiftGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
||||||
private baseUrlInput = "#baseUrl";
|
private baseUrlInput = "baseUrl";
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.requiredFields.push(this.baseUrlInput);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public typeBaseUrlInput(value: string) {
|
public typeBaseUrlInput(value: string) {
|
||||||
cy.get(this.baseUrlInput).type(value).blur();
|
cy.findByTestId(this.baseUrlInput).type(value);
|
||||||
|
cy.findByTestId(this.baseUrlInput).blur();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertbaseUrlInputEqual(value: string) {
|
public assertbaseUrlInputEqual(value: string) {
|
||||||
cy.get(this.baseUrlInput).should("have.value", value);
|
cy.findByTestId(this.baseUrlInput).should("have.value", value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,9 @@ export default class ProviderOpenshiftGeneralSettings extends ProviderBaseGenera
|
||||||
|
|
||||||
public fillData(idpName: string) {
|
public fillData(idpName: string) {
|
||||||
this.fillCommonFields(idpName);
|
this.fillCommonFields(idpName);
|
||||||
cy.get(this.baseUrlInput).type(idpName + base_url_input_test_value);
|
cy.findByTestId(this.baseUrlInput).type(
|
||||||
|
idpName + base_url_input_test_value
|
||||||
|
);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import ProviderBaseGeneralSettingsPage from "../ProviderBaseGeneralSettingsPage";
|
import ProviderBaseGeneralSettingsPage from "../ProviderBaseGeneralSettingsPage";
|
||||||
|
|
||||||
export default class ProviderPaypalGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
export default class ProviderPaypalGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
||||||
private targetSandboxSwitch = "#paypalSandbox";
|
private targetSandboxSwitch = "sandbox";
|
||||||
|
|
||||||
public clickTargetSandboxSwitch() {
|
public clickTargetSandboxSwitch() {
|
||||||
cy.get(this.targetSandboxSwitch).parent().click();
|
cy.findByTestId(this.targetSandboxSwitch).parent().click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertTargetSandboxSwitchTurnedOn(isOn: boolean) {
|
public assertTargetSandboxSwitchTurnedOn(isOn: boolean) {
|
||||||
super.assertSwitchStateOn(cy.get(this.targetSandboxSwitch), isOn);
|
super.assertSwitchStateOn(cy.findByTestId(this.targetSandboxSwitch), isOn);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export default class ProviderPaypalGeneralSettings extends ProviderBaseGeneralSe
|
||||||
|
|
||||||
public assertFilledDataEqual(idpName: string) {
|
public assertFilledDataEqual(idpName: string) {
|
||||||
this.assertCommonFilledDataEqual(idpName);
|
this.assertCommonFilledDataEqual(idpName);
|
||||||
this.assertSwitchStateOn(cy.get(this.targetSandboxSwitch));
|
this.assertSwitchStateOn(cy.findByTestId(this.targetSandboxSwitch));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,20 +3,20 @@ import ProviderBaseGeneralSettingsPage from "../ProviderBaseGeneralSettingsPage"
|
||||||
const key_input_test_value = "key_input_test_value";
|
const key_input_test_value = "key_input_test_value";
|
||||||
|
|
||||||
export default class ProviderStackoverflowGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
export default class ProviderStackoverflowGeneralSettings extends ProviderBaseGeneralSettingsPage {
|
||||||
private keyInput = "#stackoverflowKey";
|
private keyInput = "key";
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.requiredFields.push(this.keyInput);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public typeKeyInput(value: string) {
|
public typeKeyInput(value: string) {
|
||||||
cy.get(this.keyInput).type(value).blur();
|
cy.findByTestId(this.keyInput).type(value);
|
||||||
|
cy.findByTestId(this.keyInput).blur();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public assertKeyInputEqual(value: string) {
|
public assertKeyInputEqual(value: string) {
|
||||||
cy.get(this.keyInput).should("have.value", value);
|
cy.findByTestId(this.keyInput).should("have.value", value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue