From 5be60043d55edb7d862d9bf6fa0d7a9b2a7872d8 Mon Sep 17 00:00:00 2001 From: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com> Date: Thu, 24 Sep 2026 10:32:21 +0800 Subject: [PATCH] test(auth): select password field precisely Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com> --- web/e2e/auth-entry.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/e2e/auth-entry.spec.ts b/web/e2e/auth-entry.spec.ts index 8070d443..c3c1ea10 100644 --- a/web/e2e/auth-entry.spec.ts +++ b/web/e2e/auth-entry.spec.ts @@ -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()