-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds PHPUnit tests for gutenberg_register_fonts_from_theme_json(). #49877
Adds PHPUnit tests for gutenberg_register_fonts_from_theme_json(). #49877
Conversation
Size Change: 0 B Total Size: 1.36 MB ℹ️ View Unchanged
|
c86b659
to
c686fc0
Compare
c686fc0
to
ce852de
Compare
Flaky tests detected in ce852de. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4737254870
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added some minor suggestions. Thanks!
Thank you for reviewing @anton-vlasenko 😃 I've committed both of your typo fixes - thank you - as well as left the reasoning for why |
cea3524
to
aeedd6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the quick reply, @hellofromtonya.
I was not able to find anything except the typos I mentioned.
The code looks good to me 👍
Therefore, I approved the PR.
What?
Adding PHPUnit tests for
gutenberg_register_fonts_from_theme_json()
.Why?
theme.json
and style variation fonts and variations.How?
Adds a theme with fonts defined in its
theme.json
and a mixture of scenarios in its style variations.Adds a test class for this function with the following coverage:
theme.json
and style variations.variations-duplicate-fonts
style variation includes with duplicate DM Sans variations.src
file:./
into a URL to the font's asset file.fontFamily
intofont-family
.fontFace
is not defined.Missing test coverage
Testing the variation font-family handle logic is missing from this PR. Why? There's possibly a flaw in the logic that needs investigation. This makes it out-of-scope for this PR.
Testing Instructions
CI is green.
Manual