Skip to content
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

Update Global Styles Controller PHPUnit tests #47502

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

Mamaduka
Copy link
Member

What?

PR updates Global Styles Controller PHPUnit tests to match the core and reduce noise when running them.

How?

  • Use @doesNotPerformAssertions instead of $this->markTestIncomplete(); when controlled doesn't implement the method.
  • Removed find_and_normalize_global_styles_by_id helper method.
  • Added test_get_item_schema tests.

Testing Instructions

CI is green.

Manual

npm run test:unit:php -- --filter Gutenberg_REST_Global_Styles_Controller_Test

Screenshots

Before
CleanShot 2023-01-27 at 18 33 02

After
CleanShot 2023-01-27 at 18 32 00

@Mamaduka Mamaduka self-assigned this Jan 27, 2023
@Mamaduka Mamaduka added [Type] Code Quality Issues or PRs that relate to code quality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jan 27, 2023
@github-actions
Copy link

github-actions bot commented Jan 27, 2023

Flaky tests detected in 26d84a4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4041665345
📝 Reported issues:

@Mamaduka Mamaduka force-pushed the update/global-styles-controller-tests branch from bd2060e to 26d84a4 Compare January 30, 2023 07:48
@Mamaduka Mamaduka merged commit 6e16d73 into trunk Jan 30, 2023
@Mamaduka Mamaduka deleted the update/global-styles-controller-tests branch January 30, 2023 10:30
@github-actions github-actions bot added this to the Gutenberg 15.1 milestone Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants