-
Notifications
You must be signed in to change notification settings - Fork 909
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
Add placeholders and integration tests to indexables builders queries #20834
Conversation
Pull Request Test Coverage Report for Build 6931962523
💛 - Coveralls |
c6ba8b8
to
7f1f994
Compare
Also fix corresponding unit test
Integration test for Indexable_Post_Type_Archive_Builder class. This ensures the refactoring of the MySql query doesn't break anything.
Fix corresponding unit test
Fix corresponding unit test
Fix corresponding unit test
e84ffe9
to
8dc0d16
Compare
Fix unit tests accordingly.
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.
Some small comments 🚧
* | ||
* @coversDefaultClass Yoast\WP\SEO\Builders\Indexable_Author_Builder | ||
*/ | ||
class Indexable_Author_Builder_Test extends TestCase { |
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.
The cases for author_has_public_posts_wp
And $this->options_helper->get( 'noindex-author-noposts-wpseo', false )
and \apply_filters( 'wpseo_should_build_and_save_user_indexable'
are not covered.
I think it would be nice to also include those.
|
||
$this->instance->set_social_image_helpers( | ||
YoastSEO()->helpers->image, | ||
YoastSEO()->classes->get( 'Yoast\WP\SEO\Helpers\Open_Graph\Image_Helper' ), |
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.
You can use YoastSEO()->helpers->open_graph->image here.
$this->instance->set_social_image_helpers( | ||
YoastSEO()->helpers->image, | ||
YoastSEO()->classes->get( 'Yoast\WP\SEO\Helpers\Open_Graph\Image_Helper' ), | ||
YoastSEO()->classes->get( 'Yoast\WP\SEO\Helpers\Twitter\Image_Helper' ) |
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.
You can use YoastSEO()->helpers->twitter->image here.
|
||
$this->instance->set_social_image_helpers( | ||
YoastSEO()->helpers->image, | ||
YoastSEO()->classes->get( 'Yoast\WP\SEO\Helpers\Open_Graph\Image_Helper' ), |
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.
Same as above with using the ->open_graph-> and ->twitter->
Context
src/builders/indexable-post-type-archive-builder.php
src/builders/indexable-author-builder.php
src/builders/indexable-term-builder.php
src/builders/indexable-home-page-builder.php
Summary
This PR can be summarized in the following changelog entry:
%i
placeholderRelevant technical choices:
build
method for each builder.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Preliminary step
Without this PR
Tools
->Yoast Test and click
Reset indexables tables & migrations`WP Data Access
SQL
(Query Builder) tabNew Query
tab paste the following query:Max rows
checkbox and clickExecute
JSON
where it saysExport to
With this PR
Without this PR
sectionFind difference
and check the two files are identicalRelevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label.Fixes #