feat(shared,tests): add error boundaries, lib utils, i18n messages, and integration tests
shared: - Add class-filter, error-state, route-error, section-error-boundary, widget-boundary components - Add ui/alert component - Add constants directory - Add breached-password, export-utils, permission-bitmap, rate-limit, resolve-action-error, route-permissions, route-resolver, type-guards lib - Add i18n messages (en, zh-CN) for invitation-codes, parent, questions, rbac tests: - Add integration tests for elective - Add tests/setup/empty-stub scripts: - Add update-md.cjs, tmp_append_en.ps1, tmp_merge_en.ps1 utilities
This commit is contained in:
@@ -12,9 +12,12 @@ test.describe("auth smoke", () => {
|
||||
test("register page renders required controls", async ({ page }) => {
|
||||
await page.goto("/register")
|
||||
await expect(page).toHaveTitle(/Register/i)
|
||||
await expect(page.getByLabel("Full Name")).toBeVisible()
|
||||
await expect(page.getByLabel("Email")).toBeVisible()
|
||||
await expect(page.getByLabel("Password")).toBeVisible()
|
||||
await expect(page.getByRole("button", { name: "Create Account" })).toBeVisible()
|
||||
// 注册表单当前使用中文文案;P1 i18n 阶段会切换为 next-intl 翻译键,
|
||||
// 届时此处的选择器应改用 data-testid 或 i18n 键以确保语言无关。
|
||||
await expect(page.getByLabel("姓名")).toBeVisible()
|
||||
await expect(page.getByLabel("邮箱")).toBeVisible()
|
||||
await expect(page.getByLabel("密码")).toBeVisible()
|
||||
await expect(page.getByRole("button", { name: "创建账户" })).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user