CFE-10 write mock for permission lists
This commit is contained in:
@@ -51,6 +51,22 @@ export const rolesHandler = [
|
||||
),
|
||||
);
|
||||
}),
|
||||
rest.get(GET_ROLE_LIST, (req, res, ctx) => {
|
||||
return res(ctx.json({
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
name: "admin",
|
||||
name_fa: "ادمین"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "manager",
|
||||
name_fa: "مدیر"
|
||||
}
|
||||
]
|
||||
}))
|
||||
}),
|
||||
rest.get(GET_PERMISSIONS_LIST, (req, res, ctx) => {
|
||||
return res(ctx.json({
|
||||
data: [
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import {fireEvent, render, screen, waitFor} from "@testing-library/react";
|
||||
import MockAppWithProviders from "../../../../../../../mocks/AppWithProvider";
|
||||
import UpdateContent from "@/components/dashboard/role-management/Form/UpdateForm/UpdateContent";
|
||||
|
||||
const row = {
|
||||
id: 0,
|
||||
getValue: name => {
|
||||
if (name === "name") {
|
||||
return "manage_passenger_office_navgan";
|
||||
}
|
||||
else if (name === "name_fa") {
|
||||
} else if (name === "name_fa") {
|
||||
return "مدیریت کارتابل رییس اداره مسافری استان";
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user