use the listing page for searching fixing these (#2330)

* use the listing page for searching fixing these

* fixed text
This commit is contained in:
Erik Jan de Wit 2022-03-24 10:11:35 +01:00 committed by GitHub
parent e46f818650
commit 07d1202d1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View file

@ -43,7 +43,7 @@ describe("User profile tabs", () => {
getUserProfileTab();
getAttributesTab();
clickCreateAttributeButton();
cy.get("p").should("have.text", "Create attribute");
cy.get("p").should("have.text", "Create a new attribute");
});
});

View file

@ -180,8 +180,6 @@ export default class RealmSettingsPage {
private createClientDrpDwn = ".pf-c-dropdown.pf-m-align-right";
private clientPolicyDrpDwn = '[data-testid="action-dropdown"] button';
private deleteclientPolicyDrpDwn = "deleteClientPolicyDropdown";
private searchFld = "[id^=realm-settings][id$=profilesinput]";
private searchFldPolicies = "[id^=realm-settings][id$=clientPoliciesinput]";
private clientProfileOne =
'a[href*="realm-settings/clientPolicies/Test/edit-profile"]';
private clientProfileTwo =
@ -617,9 +615,7 @@ export default class RealmSettingsPage {
}
shouldSearchClientProfile() {
cy.get(this.searchFld).click({ force: true }).type("Test").click();
cy.get("table").should("be.visible").contains("td", "Test");
cy.get(this.searchFld).click({ force: true }).clear();
new ListingPage().searchItem("Test", false).itemExist("Test");
return this;
}
@ -912,16 +908,12 @@ export default class RealmSettingsPage {
}
searchClientPolicy(name: string) {
cy.get(this.searchFldPolicies).click({ force: true }).type(name).click();
cy.get("table").should("be.visible").contains("td", name);
cy.get(this.searchFldPolicies).click({ force: true }).clear();
new ListingPage().searchItem(name, false).itemExist(name);
return this;
}
searchClientProfile(name: string) {
cy.get(this.searchFld).click({ force: true }).type(name).click();
cy.get("table").should("be.visible").contains("td", name);
cy.get(this.searchFld).click({ force: true }).clear();
new ListingPage().searchItem(name, false).itemExist(name);
return this;
}