diff --git a/tests/studio/test_studio_text_descender_clipping.py b/tests/studio/test_studio_text_descender_clipping.py index 7cad6cacfe..fc31b6c157 100644 --- a/tests/studio/test_studio_text_descender_clipping.py +++ b/tests/studio/test_studio_text_descender_clipping.py @@ -34,10 +34,15 @@ 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. + # [^"\s] keeps the wildcard inside the className attribute, and the trailing + # displayTitle anchor pins the match to the account block itself so a + # lookalike wrapper (the update card) can never satisfy the guard. pattern = re.compile( - r'', + r'(?:(?!)[\s\S]){0,400}?\{displayTitle\}', ) matches = pattern.findall(src) assert matches, "could not find sidebar account-block parent div"