Explorar el Código

test: 补充密码可见状态回归

main
leiyun hace 3 semanas
padre
commit
57de9c279e
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. +3
    -0
      tests/auth-login-contract.spec.ts

+ 3
- 0
tests/auth-login-contract.spec.ts Ver fichero

@@ -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)


Cargando…
Cancelar
Guardar