refactor: rename remaining recipient references to person/people
This commit is contained in:
@@ -5,7 +5,7 @@ import { es } from "@/i18n/dictionaries/es"
|
||||
|
||||
const mocks = vi.hoisted(() => ({
|
||||
getI18n: vi.fn(),
|
||||
findAllRecipients: vi.fn(),
|
||||
findAllPeople: vi.fn(),
|
||||
findAllItemsWithStock: vi.fn(),
|
||||
findAllAvailableAssets: vi.fn(),
|
||||
findAllItems: vi.fn(),
|
||||
@@ -25,7 +25,7 @@ vi.mock("@/i18n/server", () => ({
|
||||
|
||||
vi.mock("@/services/person.service", () => ({
|
||||
PersonService: {
|
||||
findAll: mocks.findAllRecipients,
|
||||
findAll: mocks.findAllPeople,
|
||||
},
|
||||
}))
|
||||
|
||||
@@ -72,9 +72,9 @@ describe("assignment form pages localization", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
mocks.getI18n.mockResolvedValue({ dictionary: es, locale: "es" })
|
||||
mocks.findAllRecipients.mockResolvedValue([
|
||||
mocks.findAllPeople.mockResolvedValue([
|
||||
{
|
||||
id: "recipient-1",
|
||||
id: "person-1",
|
||||
firstName: "Ada",
|
||||
lastName: "Lovelace",
|
||||
},
|
||||
@@ -122,10 +122,8 @@ describe("assignment form pages localization", () => {
|
||||
const html = renderToStaticMarkup(await NewAssignmentPage())
|
||||
|
||||
expect(html).toContain("Nueva asignación")
|
||||
expect(html).toContain("Destinatario")
|
||||
expect(html).toContain(
|
||||
'option value="">Selecciona un destinatario</option>',
|
||||
)
|
||||
expect(html).toContain("Persona")
|
||||
expect(html).toContain('option value="">Selecciona una persona</option>')
|
||||
expect(html).toContain("Artículo")
|
||||
expect(html).toContain('option value="">Selecciona un artículo</option>')
|
||||
expect(html).toContain("Cantidad")
|
||||
@@ -142,7 +140,7 @@ describe("assignment form pages localization", () => {
|
||||
|
||||
mocks.findAssignmentById.mockResolvedValue({
|
||||
id: "assignment-1",
|
||||
recipientId: "recipient-1",
|
||||
personId: "person-1",
|
||||
itemId: "item-1",
|
||||
assetId: "asset-1",
|
||||
quantity: 1,
|
||||
@@ -155,7 +153,7 @@ describe("assignment form pages localization", () => {
|
||||
)
|
||||
|
||||
expect(html).toContain("Editar asignación")
|
||||
expect(html).toContain("Destinatario")
|
||||
expect(html).toContain("Persona")
|
||||
expect(html).toContain("Artículo")
|
||||
expect(html).toContain("Activo")
|
||||
expect(html).toContain('option value="">Selecciona un activo</option>')
|
||||
|
||||
Reference in New Issue
Block a user