From bc87b513791c8d9515bb4923e1d03e1d58082ad0 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Wed, 3 Jun 2026 19:38:26 -0400 Subject: [PATCH] Exempt WebUI and trivial UI from ARCH-062 CUJ test best practice (#36956) --- docs/best-practices/architecture.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/best-practices/architecture.md b/docs/best-practices/architecture.md index 671263ed426..d9c31c118c0 100644 --- a/docs/best-practices/architecture.md +++ b/docs/best-practices/architecture.md @@ -1395,6 +1395,13 @@ etc.). Non-UI components such as tab helpers, services, or background logic should be covered by unit tests or browser tests appropriate to the code — a CUJ test is not required when there is no user-visible interaction to validate. +**Exception:** This rule targets native (Views) UI that `InteractiveBrowserTest` +can drive. Don't require a CUJ test for WebUI pages such as `brave://settings` +or `chrome://history`, where `InteractiveBrowserTest`-style testing is not +available, nor for trivial UI with no meaningful logic to test (e.g. a toggle +wired to a pref), nor for changes that follow an existing untested pattern in +the surrounding code. + ```cpp // ✅ CORRECT - CUJ test: validates user-visible behavior end-to-end IN_PROC_BROWSER_TEST_F(MyFeatureInteractiveTest, UserCanToggleFeature) {