From 3c41728017b69688127ce5e2cad47203595af1bf Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 9 Nov 2026 21:50:27 +0000 Subject: [PATCH] test(e2e): assert server-rendered biography after profile update (#40176) Since Playwright 1.56, a WebKit click on a native submit button can return before the form navigation starts, so `toHaveValue` passed on the old page with the value `fill()` just set, and the next step raced the reload. Assert the textarea's text instead, its server-rendered default, which only the reloaded page has. --------- Co-authored-by: Lunny Xiao --- tests/e2e/user-settings.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/user-settings.test.ts b/tests/e2e/user-settings.test.ts index 80d4fd9d619..fbc84c7885b 100644 --- a/tests/e2e/user-settings.test.ts +++ b/tests/e2e/user-settings.test.ts @@ -10,11 +10,11 @@ test('update profile biography', async ({page, request}) => { await page.getByLabel('Biography').fill(bio); await page.getByRole('button', {name: 'Update Profile'}).click(); await expect(page.getByText('Your profile has been updated.', {exact: true})).toBeVisible(); - await expect(page.getByLabel('Biography')).toHaveValue(bio); + await expect(page.getByLabel('Biography')).toHaveText(bio); await page.getByLabel('Biography').fill(''); await page.getByRole('button', {name: 'Update Profile'}).click(); await expect(page.getByText('Your profile has been updated.', {exact: true})).toBeVisible(); - await expect(page.getByLabel('Biography')).toHaveValue(''); + await expect(page.getByLabel('Biography')).toHaveText(''); }); test('select and deselect all webhook events', async ({page}) => {