From 96f0ad90c6f09a083b7c4ff312ae3a4f2e86cfd3 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 23 May 2026 10:37:10 +0000 Subject: [PATCH] test(react-ui): disambiguate Max Items locator after adding Max Body Bytes The Tracing settings panel now has two number inputs. The previous spec matched 'input[type="number"]' which became ambiguous and triggered a Playwright strict-mode violation in CI. Switch to getByPlaceholder('100') for Max Items and add a parallel spec for the new Max Body Bytes field using getByPlaceholder('65536'). Signed-off-by: Ettore Di Giacinto Assisted-by: Claude:claude-opus-4-7 --- core/http/react-ui/e2e/traces.spec.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/http/react-ui/e2e/traces.spec.js b/core/http/react-ui/e2e/traces.spec.js index 4a247b5b3..9382593e9 100644 --- a/core/http/react-ui/e2e/traces.spec.js +++ b/core/http/react-ui/e2e/traces.spec.js @@ -52,11 +52,22 @@ test.describe('Traces Settings', () => { await page.locator('button', { hasText: 'Tracing is' }).click() await expect(page.locator('text=Enable Tracing')).toBeVisible() - const maxItemsInput = page.locator('input[type="number"]') + // The Tracing panel has two numeric inputs (Max Items and Max Body Bytes). + // Disambiguate by placeholder so adding a third field later doesn't break this. + const maxItemsInput = page.getByPlaceholder('100') await maxItemsInput.fill('500') await expect(maxItemsInput).toHaveValue('500') }) + test('set max body bytes value', async ({ page }) => { + await page.locator('button', { hasText: 'Tracing is' }).click() + await expect(page.locator('text=Enable Tracing')).toBeVisible() + + const maxBodyBytesInput = page.getByPlaceholder('65536') + await maxBodyBytesInput.fill('16384') + await expect(maxBodyBytesInput).toHaveValue('16384') + }) + test('save shows toast', async ({ page }) => { // Expand settings await page.locator('button', { hasText: 'Tracing is' }).click()