From a3861424a984269d87887c81ef09ad3bf8adafdd Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sat, 18 Jul 2026 10:45:50 +0000 Subject: [PATCH] tests: unstick the sidebar descender guard after the truncation restyle The account-block regex required flex and flex-col to be adjacent, but the sidebar long-name truncation work (#7171) inserted min-w-0 flex-1 between them, so the guard stopped matching anything and Backend CI's Repo tests (CPU) job has failed on main and every branch since. The markup still uses leading-tight, so the invariant the test protects was never violated; only the pattern was stale. Allow utility classes between flex and flex-col, keeping the leading-* capture unchanged. All three tests in the file pass against the current sources. --- tests/studio/test_studio_text_descender_clipping.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/studio/test_studio_text_descender_clipping.py b/tests/studio/test_studio_text_descender_clipping.py index 7cad6cacfe..bd3267e2b7 100644 --- a/tests/studio/test_studio_text_descender_clipping.py +++ b/tests/studio/test_studio_text_descender_clipping.py @@ -34,10 +34,11 @@ def test_model_selector_trigger_label_uses_leading_tight(): def test_sidebar_account_block_uses_leading_tight(): src = _read(APP_SIDEBAR) - # Match the account-block parent div regardless of its gap utility; this - # guard is about the leading-* class, not the spacing. + # Match the account-block parent div regardless of its gap utility or any + # sizing classes between flex and flex-col (min-w-0 flex-1 arrived with the + # long-name truncation work); this guard is about the leading-* class only. pattern = re.compile( - r'', + r'', ) matches = pattern.findall(src) assert matches, "could not find sidebar account-block parent div"