"Remove role" alert text is wrong (#36173)

Closes #36172

Signed-off-by: SebastEnn <103125747+SebastEnn@users.noreply.github.com>
This commit is contained in:
SebastEnn
2025-01-06 15:47:56 +01:00
committed by GitHub
parent 0535c76e06
commit 4669cfe9cb
5 changed files with 10 additions and 24 deletions

View File

@@ -169,7 +169,7 @@ describe("Roles tab test", () => {
commonPage
.masthead()
.checkNotificationMessage("Scope mapping successfully removed", true);
.checkNotificationMessage("Role mapping updated", true);
commonPage.tableUtils().selectRowItemAction("manage-consent", "Unassign");
commonPage.sidebar().waitForPageLoad();
@@ -197,7 +197,7 @@ describe("Roles tab test", () => {
commonPage
.masthead()
.checkNotificationMessage("Scope mapping successfully removed", true);
.checkNotificationMessage("Role mapping updated", true);
});
it("Should delete client role test", () => {

View File

@@ -301,9 +301,7 @@ describe("Clients test", () => {
commonPage.sidebar().waitForPageLoad();
commonPage.modalUtils().checkModalTitle("Remove role?").confirmModal();
commonPage
.masthead()
.checkNotificationMessage("Scope mapping successfully removed");
commonPage.masthead().checkNotificationMessage("Role mapping updated");
//cy.intercept(`/admin/realms/${realmName}/users`).as("assignRoles");
serviceAccountTab

View File

@@ -173,10 +173,7 @@ describe("Realm roles test", () => {
modalUtils.checkModalTitle("Remove role?").confirmModal();
sidebarPage.waitForPageLoad();
masthead.checkNotificationMessage(
"Scope mapping successfully removed",
true,
);
masthead.checkNotificationMessage("Role mapping updated", true);
});
it("Should delete all roles from search bar", () => {
@@ -192,10 +189,7 @@ describe("Realm roles test", () => {
modalUtils.checkModalTitle("Remove role?").confirmModal();
sidebarPage.waitForPageLoad();
masthead.checkNotificationMessage(
"Scope mapping successfully removed",
true,
);
masthead.checkNotificationMessage("Role mapping updated", true);
});
it("Should delete associated roles from list test", () => {
@@ -223,19 +217,13 @@ describe("Realm roles test", () => {
modalUtils.checkModalTitle("Remove role?").confirmModal();
sidebarPage.waitForPageLoad();
masthead.checkNotificationMessage(
"Scope mapping successfully removed",
true,
);
masthead.checkNotificationMessage("Role mapping updated", true);
listingPage.removeItem("offline_access");
sidebarPage.waitForPageLoad();
modalUtils.checkModalTitle("Remove role?").confirmModal();
sidebarPage.waitForPageLoad();
masthead.checkNotificationMessage(
"Scope mapping successfully removed",
true,
);
masthead.checkNotificationMessage("Role mapping updated", true);
});
describe("edit role details", () => {

View File

@@ -58,7 +58,7 @@ describe("Realm settings - User registration tab", () => {
.checkModalMessage("Are you sure you want to remove this role?")
.checkConfirmButtonText("Remove")
.confirmModal();
masthead.checkNotificationMessage("Scope mapping successfully removed");
masthead.checkNotificationMessage("Role mapping updated");
});
it("Add default group", () => {

View File

@@ -172,11 +172,11 @@ export const RoleMapping = ({
onConfirm: async () => {
try {
await Promise.all(deleteMapping(adminClient, type, id, selected));
addAlert(t("clientScopeRemoveSuccess"), AlertVariant.success);
addAlert(t("roleMappingUpdatedSuccess"), AlertVariant.success);
setSelected([]);
refresh();
} catch (error) {
addError("clientScopeRemoveError", error);
addError("roleMappingUpdatedError", error);
}
},
});