fix(e2e): 修复 auth.spec.ts 选择器,placeholder 改为 label
Deploy / Staging E2E Tests (push) Failing after 132h5m39s
Deploy / Deploy Staging (push) Failing after 132h7m13s
CI/CD Pipeline / Frontend Lint (push) Failing after 132h7m49s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 132h7m49s
Deploy / Production Browser E2E (push) Failing after 1790h41m15s
Deploy / Deploy Production (push) Failing after 1790h41m17s
Deploy / Build Production Runtime Images (push) Failing after 1790h41m47s
Deploy / Staging E2E Tests (push) Failing after 132h5m39s
Deploy / Deploy Staging (push) Failing after 132h7m13s
CI/CD Pipeline / Frontend Lint (push) Failing after 132h7m49s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 132h7m49s
Deploy / Production Browser E2E (push) Failing after 1790h41m15s
Deploy / Deploy Production (push) Failing after 1790h41m17s
Deploy / Build Production Runtime Images (push) Failing after 1790h41m47s
登录页邮箱/密码的 placeholder 是 name@example.com 和 •••••••••, label 才是 邮箱/密码。改用 getByLabel 更语义化也更稳定。
This commit is contained in:
@@ -3,8 +3,8 @@ import { expect, test } from "@playwright/test";
|
||||
test.describe("Authentication page", () => {
|
||||
test("renders login form", async ({ page }) => {
|
||||
await page.goto("/login");
|
||||
await expect(page.getByPlaceholder("邮箱")).toBeVisible();
|
||||
await expect(page.getByPlaceholder("密码")).toBeVisible();
|
||||
await expect(page.getByLabel("邮箱")).toBeVisible();
|
||||
await expect(page.getByLabel("密码")).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: /登\s*录/ })).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user