From 57de9c279e2ff79e409b83226d2a70859d85c452 Mon Sep 17 00:00:00 2001 From: leiyun Date: Sun, 23 Aug 2026 11:32:34 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=A1=A5=E5=85=85=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=8F=AF=E8=A7=81=E7=8A=B6=E6=80=81=E5=9B=9E=E5=BD=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/auth-login-contract.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auth-login-contract.spec.ts b/tests/auth-login-contract.spec.ts index e3fa6b8..1572af2 100644 --- a/tests/auth-login-contract.spec.ts +++ b/tests/auth-login-contract.spec.ts @@ -357,11 +357,14 @@ test.describe('登录上下文 UI 契约', () => { await expect(page.locator('.login-password-toggle')).toBeVisible() await expect(page.locator('.login-password-toggle svg')).toHaveCount(1) await expect(page.locator('.login-password-toggle')).toHaveAttribute('aria-label', '显示密码') + await expect(page.locator('[data-password-visibility-icon="hidden"]')).toBeVisible() await page.locator('.login-password-toggle').click() await expect(passwordInput(page)).toHaveAttribute('type', 'text') await expect(page.locator('.login-password-toggle')).toHaveAttribute('aria-label', '隐藏密码') + await expect(page.locator('[data-password-visibility-icon="visible"]')).toBeVisible() await page.locator('.login-password-toggle').click() await expect(passwordInput(page)).toHaveAttribute('type', 'password') + await expect(page.locator('[data-password-visibility-icon="hidden"]')).toBeVisible() expect(await adminUsernameInput(page).getAttribute('list')).toBeNull() await expect(page.locator('datalist')).toHaveCount(0) await expect(page.locator('select[name*="user" i], select[name*="account" i]')).toHaveCount(0)