feat(i18n): localize inventory categories UI
This commit is contained in:
@@ -68,6 +68,36 @@ test.describe("language switcher", () => {
|
||||
await expectLocaleCookie(page, "es")
|
||||
})
|
||||
|
||||
test("renders inventory categories copy in the active locale", async ({
|
||||
baseURL,
|
||||
page,
|
||||
}) => {
|
||||
await signInAsAdmin(page, baseURL)
|
||||
await setLocaleCookie(page, "es", baseURL)
|
||||
|
||||
await page.goto("/inventory/categories")
|
||||
|
||||
await expect(page.locator("html")).toHaveAttribute("lang", "es")
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Categorías" }),
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
page.getByRole("link", { name: /Agregar categoría/ }),
|
||||
).toBeVisible()
|
||||
await expect(page.getByText("No se encontraron categorías.")).toBeVisible()
|
||||
|
||||
await page.goto("/inventory/categories/new")
|
||||
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Nueva categoría" }),
|
||||
).toBeVisible()
|
||||
await expect(page.getByLabel("Nombre")).toBeVisible()
|
||||
await expect(page.getByPlaceholder("Nombre de la categoría")).toBeVisible()
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Crear categoría" }),
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test("switches the authenticated dashboard language from the navbar", async ({
|
||||
baseURL,
|
||||
page,
|
||||
|
||||
Reference in New Issue
Block a user