added test for searching client profiles (#1305)

Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
agagancarczyk 2021-10-05 09:08:05 +01:00 committed by GitHub
parent ed7ba908ba
commit fae250f13e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -462,6 +462,10 @@ describe("Realm settings tests", () => {
realmSettingsPage.shouldCompleteAndCreateNewClientProfile();
});
it("Should perform client profile search by profile name", () => {
realmSettingsPage.shouldSearchClientProfile();
});
it("Check cancelling the client profile deletion", () => {
realmSettingsPage.shouldDisplayDeleteClientProfileDialog();
});

View file

@ -162,6 +162,7 @@ export default class RealmSettingsPage {
private jsonEditorReloadBtn = "jsonEditor-reloadBtn";
private jsonEditor = ".monaco-scrollable-element.editor-scrollable.vs";
private createClientDrpDwn = ".pf-c-dropdown.pf-m-align-right";
private searchFld = "[id^=realm-settings][id$=profilesinput]";
selectLoginThemeType(themeType: string) {
cy.get(this.selectLoginTheme).click();
@ -509,6 +510,12 @@ 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();
}
shouldDisplayDeleteClientProfileDialog() {
cy.get(this.moreDrpDwn).last().click();
cy.get(this.moreDrpDwnItems).click();