From 1384207ade55a11e5fedba03f56dc6c4104aabc4 Mon Sep 17 00:00:00 2001 From: tijmen Date: Wed, 16 Sep 2026 16:58:42 +0200 Subject: [PATCH] wait for focus --- test/integration/auth.setup.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/auth.setup.ts b/test/integration/auth.setup.ts index 5bb966c5..019f3d44 100644 --- a/test/integration/auth.setup.ts +++ b/test/integration/auth.setup.ts @@ -1,4 +1,4 @@ -import { test as setup } from '@playwright/test'; +import { test as setup, expect } from '@playwright/test'; import path from 'path'; const authFile = path.join(__dirname, './.auth/user.json'); @@ -6,8 +6,11 @@ const authFile = path.join(__dirname, './.auth/user.json'); setup.describe('setup', () => { setup('authenticate', async ({ page }) => { await page.goto('/wp-login.php'); + await expect(page.locator('#user_login')).toBeFocused(); await page.fill('#user_login', 'admin'); await page.fill('#user_pass', 'password'); + await expect(page.locator('#user_login')).toHaveValue('admin'); + await expect(page.locator('#user_pass')).toHaveValue('password'); await Promise.all([ page.waitForURL('**/wp-admin/**', { timeout: 15000 }),