refactor: move unified Person+User form to /people/new, admin-only

This commit is contained in:
2026-06-17 08:51:23 +02:00
parent 1f5a849bf5
commit 4f370eee70
12 changed files with 333 additions and 49 deletions
+5 -5
View File
@@ -60,13 +60,13 @@ describe("new user form localization", () => {
it("renders new user page with localized title and unified form labels in Spanish", async () => {
const { default: NewUserPage } = await import(
"@/app/(dashboard)/admin/users/new/page"
"@/app/(dashboard)/people/new/page"
)
const html = renderToStaticMarkup(await NewUserPage())
// Title
expect(html).toContain("Nuevo usuario")
expect(html).toContain("Nueva persona")
// Person field labels
expect(html).toContain("Nombre")
@@ -94,12 +94,12 @@ describe("new user form localization", () => {
mocks.getI18n.mockResolvedValue({ dictionary: en, locale: "en" })
const { default: NewUserPage } = await import(
"@/app/(dashboard)/admin/users/new/page"
"@/app/(dashboard)/people/new/page"
)
const html = renderToStaticMarkup(await NewUserPage())
expect(html).toContain("New User")
expect(html).toContain("New Person")
// Person fields
expect(html).toContain("First Name")
@@ -122,7 +122,7 @@ describe("new user form localization", () => {
it("keeps canonical role values in option value attributes including NO_USER, not localized labels", async () => {
const { default: NewUserPage } = await import(
"@/app/(dashboard)/admin/users/new/page"
"@/app/(dashboard)/people/new/page"
)
const html = renderToStaticMarkup(await NewUserPage())