refactor: move unified Person+User form to /people/new, admin-only
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user