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.
This commit is contained in:
parent
a8ff8673df
commit
a3861424a9
1 changed files with 4 additions and 3 deletions
|
|
@ -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'<div\s+className="flex\s+flex-col\s+gap-\S+\s+(\S+)\s+group-data-\[collapsible=icon\]:hidden">',
|
||||
r'<div\s+className="flex\s+(?:\S+\s+)*?flex-col\s+gap-\S+\s+(\S+)\s+group-data-\[collapsible=icon\]:hidden">',
|
||||
)
|
||||
matches = pattern.findall(src)
|
||||
assert matches, "could not find sidebar account-block parent div"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue