Skip to content

Commit 2311707

Browse files
committed
fix(e2e): use blur() instead of press Tab for reliable validation trigger on WebKit
1 parent bd5d9a1 commit 2311707

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

e2e/profile.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ test('Validate phone number when updating data', async ({
2525

2626
// Fill phoneNumber with invalid value
2727
await phoneNumber.fill('6512345678')
28-
await phoneNumber.press('Tab')
28+
await phoneNumber.blur()
2929

3030
// Expect visibility only when JavaScript is enabled
3131
if (!noscript) {
3232
const errorMessage = page.getByText(
3333
'Nomor WhatsApp harus mengandung kode negara dan nomor telepon'
3434
)
35-
await expect(errorMessage).toBeVisible()
35+
await expect(errorMessage).toBeVisible({ timeout: 10000 })
3636
}
3737

3838
// Fill phoneNumber with valid value
@@ -59,11 +59,11 @@ test('Validate name when updating data', async ({ page, noscript, screen }) => {
5959

6060
// Clear name and trigger validation
6161
await name.fill('')
62-
await name.press('Tab')
62+
await name.blur()
6363

6464
if (!noscript) {
6565
const errorMessage = page.getByText('Nama Lengkap wajib diisi')
66-
await expect(errorMessage).toBeVisible()
66+
await expect(errorMessage).toBeVisible({ timeout: 10000 })
6767
}
6868

6969
// Fill valid name and submit

0 commit comments

Comments
 (0)