Repository navigation
Studio tests: scan the model selector label wherever its classes live - #8802
Closed
danielhanchen wants to merge 1 commit into
Closed
danielhanchen wants to merge 1 commit into
danielhanchen wants to merge 1 commit into
Conversation
Member
Author
|
Closing as a duplicate of #8801, which I opened a couple of minutes earlier for the same failure. The two fixes agree on the diagnosis. #8801 drops the ordering requirement as well: it matches the class set against each literal rather than keeping a regex that still wants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/studio/test_studio_text_descender_clipping.py::test_model_selector_trigger_label_uses_leading_tightfails onmain, so every PR's Repo tests (CPU) job is red:The label is fine. What moved is where its classes are written.
What happened
The test looked for a literal attribute:
r'<span\s+className="[^"]*\bmin-w-0\b[^"]*\bflex-1\b[^"]*\btruncate\b...'The trigger label now composes its classes so a caller can extend them:
className={cn(is notclassName=", so the pattern matched nothing and the test failed on its own "did I find anything" assertion.leading-tightwas there the whole time.The fix
Match the quoted class list wherever it appears rather than only in an attribute. The five required tokens still have to be present, in order, in one string, and both assertions that follow are unchanged.
Verified
mainat 1838e10.leading-tightforleading-nonefails the suite (2 failed), so the guard is not weakened.