소스 검색

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

main
leiyun 3 주 전
부모
커밋
57de9c279e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. +3
    -0
      tests/auth-login-contract.spec.ts

+ 3
- 0
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)


불러오는 중...
취소
저장