mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-07 02:57:51 +00:00
test(auth): select password field precisely
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
parent
5aea7345b8
commit
5be60043d5
1 changed files with 2 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ test.describe('Auth Entry', () => {
|
|||
await expect.poll(() => loginPage.evaluate(async () => (await fetch('/api/v1/auth/me')).status)).toBe(401)
|
||||
|
||||
await loginPage.getByLabel('Username').fill(username)
|
||||
await loginPage.getByLabel('Password').fill(password)
|
||||
await loginPage.getByLabel('Password', { exact: true }).fill(password)
|
||||
await loginPage.getByRole('button', { name: 'Login' }).click()
|
||||
await expect(loginPage).toHaveURL('/dashboard/tokens')
|
||||
await expect.poll(() => loginPage.evaluate(async () => (await fetch('/api/v1/auth/me')).status)).toBe(200)
|
||||
|
|
@ -128,7 +128,7 @@ test.describe('Auth Entry', () => {
|
|||
await setEnglishLocale(defaultLoginPage)
|
||||
await defaultLoginPage.goto('/login')
|
||||
await defaultLoginPage.getByLabel('Username').fill(username)
|
||||
await defaultLoginPage.getByLabel('Password').fill(password)
|
||||
await defaultLoginPage.getByLabel('Password', { exact: true }).fill(password)
|
||||
await defaultLoginPage.getByRole('button', { name: 'Login' }).click()
|
||||
await expect(defaultLoginPage).toHaveURL('/')
|
||||
await defaultLoginPage.close()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue