From 95b6eea5bb4857cc29f4702b89cad176b422e820 Mon Sep 17 00:00:00 2001 From: Kerry Lu Date: Tue, 20 Oct 2026 14:59:34 -0700 Subject: [PATCH] test(perf): tag a UI journey sample with its API response, not a Next.js prefetch under /ui/ (#47650) Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/e2e/perf/setup/ui_journeys.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/perf/setup/ui_journeys.py b/tests/e2e/perf/setup/ui_journeys.py index 2b7bda77733..4de97d8c717 100644 --- a/tests/e2e/perf/setup/ui_journeys.py +++ b/tests/e2e/perf/setup/ui_journeys.py @@ -10,8 +10,8 @@ from dataclasses import dataclass from datetime import datetime from itertools import chain from types import MappingProxyType -from urllib.parse import urlsplit from typing import Final +from urllib.parse import urlsplit from playwright.sync_api import Error as PlaywrightError from playwright.sync_api import Locator, Page, Response, expect, sync_playwright @@ -189,7 +189,9 @@ def _login(page: Page, dashboard: Dashboard) -> None: def _is_data_fetch(response: Response) -> bool: - return response.request.resource_type in ("fetch", "xhr") and "/_next/" not in response.url + """API calls only. The Admin UI's own assets and Next.js prefetches live under /ui/ and /_next/.""" + path: Final = urlsplit(response.url).path + return response.request.resource_type in ("fetch", "xhr") and not path.startswith(("/ui/", "/_next/")) def _worst(responses: list[Response]) -> Response | None: