renamed tab and better detail click (#1996)

This commit is contained in:
Erik Jan de Wit 2022-02-01 08:20:52 +01:00 committed by GitHub
parent d93d1df27a
commit aa19af62e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -61,7 +61,7 @@ export default class ProviderPage {
private roleLdapMapper = "role-ldap-mapper";
private hcLdapRoleMapper = "hardcoded-ldap-role-mapper";
private rolesTab = "#pf-tab-roles-roles";
private rolesTab = "rolesTab";
private createRoleBtn = "data-testid=no-roles-for-this-client-empty-action";
private realmRolesSaveBtn = "data-testid=realm-roles-save-button";
private roleNameField = "#kc-name";
@ -208,7 +208,7 @@ export default class ProviderPage {
}
createRole(roleName: string) {
cy.get(this.rolesTab).click();
cy.findByTestId(this.rolesTab).click();
cy.wait(1000);
cy.get(`[${this.createRoleBtn}]`).click();
cy.wait(1000);

View file

@ -810,8 +810,14 @@ export default class RealmSettingsPage {
}
shouldDeleteEditedProfile() {
cy.get(this.moreDrpDwn).last().click();
cy.get(this.moreDrpDwnItems).click();
cy.get('[data-label="Name"]')
.contains("Edit")
.parentsUntil("tbody")
.get(this.moreDrpDwn)
.last()
.click()
.get(this.moreDrpDwnItems)
.click();
cy.findByTestId("modalConfirm").contains("Delete").click();
cy.get(this.alertMessage).should("be.visible", "Client profile deleted");
cy.get("table").should("not.have.text", "Edit");