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

Remove redundant widget API endpoint tests #32298

Merged
merged 1 commit into from
May 28, 2021

Conversation

noisysocks
Copy link
Member

Removes the Widgets REST API unit tests from the Gutenberg plugin.

These are redundant as these endpoints and their tests now exist in Core.

https://github.com/WordPress/wordpress-develop/blob/master/tests/phpunit/tests/rest-api/rest-widgets-controller.php
https://github.com/WordPress/wordpress-develop/blob/master/tests/phpunit/tests/rest-api/rest-widget-types-controller.php
https://github.com/WordPress/wordpress-develop/blob/master/tests/phpunit/tests/rest-api/rest-sidebars-controller.php

If we attempt to run them in the Gutenberg plugin then we will have failures because we always run Gutenberg CI against the latest WordPress trunk meaning the REST API endpoints will be registered twice (once in core, once again in the plugin).

@noisysocks noisysocks added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. REST API Interaction Related to REST API labels May 28, 2021
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@talldan talldan merged commit 2dedf14 into trunk May 28, 2021
@talldan talldan deleted the remove/redundant-widgets-rest-api-tests branch May 28, 2021 07:37
@github-actions github-actions bot added this to the Gutenberg 10.8 milestone May 28, 2021
@noisysocks
Copy link
Member Author

Cherry-picked this into wp/trunk so as to fix PHP unit test failures in that branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REST API Interaction Related to REST API [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants