Skip to content

Commit

Permalink
Adapt the default feedback string for SKU assessment
Browse files Browse the repository at this point in the history
  • Loading branch information
FAMarfuaty committed Sep 12, 2024
1 parent 574a515 commit 3a161f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ describe( "a test for SKU assessment for WooCommerce", function() {

expect( assessmentResult.getScore() ).toEqual( 6 );
expect( assessmentResult.getText() ).toEqual( "<a href='https://yoa.st/4lw' target='_blank'>SKU</a>:" +
" Not all your product variants have a SKU. You can add a SKU via the \"Variations\" tab in the Product " +
"data box. <a href='https://yoa.st/4lx' target='_blank'>Include it if you can, as it will help search " +
" Not all your product variants have a SKU. <a href='https://yoa.st/4lx' target='_blank'>Include it if you can, as it will help search " +
"engines to better understand your content.</a>" );
} );

Expand All @@ -116,8 +115,7 @@ describe( "a test for SKU assessment for WooCommerce", function() {

expect( assessmentResult.getScore() ).toEqual( 6 );
expect( assessmentResult.getText() ).toEqual( "<a href='https://yoa.st/4lw' target='_blank'>SKU</a>:" +
" Not all your product variants have a SKU. You can add a SKU via the \"Variations\" tab in the Product " +
"data box. <a href='https://yoa.st/4lx' target='_blank'>Include it if you can, as it will help search " +
" Not all your product variants have a SKU. <a href='https://yoa.st/4lx' target='_blank'>Include it if you can, as it will help search " +
"engines to better understand your content.</a>" );
} );

Expand Down Expand Up @@ -213,7 +211,7 @@ describe( "a test for SKU assessment for Shopify", () => {
withVariants: sprintf(
/* translators: %1$s and %2$s expand to links on yoast.com, %3$s expands to the anchor end tag. */
__(
"%1$sSKU%3$s: Not all your product variants have a SKU. You can add a SKU via the \"Variations\" tab in the Product data box. %2$sInclude it if you can, as it will help search engines to better understand your content.%3$s",
"%1$sSKU%3$s: Not all your product variants have a SKU. %2$sInclude it if you can, as it will help search engines to better understand your content.%3$s",
"yoast-woo-seo"
),
urlTitleAnchorOpeningTag,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ const expectedResults = {
productSKU: {
isApplicable: true,
score: 6,
resultText: "<a href='https://yoa.st/4lw' target='_blank'>SKU</a>: Not all your product variants have a SKU. You can add a SKU via " +
"the \"Variations\" tab in the Product data box. <a href='https://yoa.st/4lx' target='_blank'>Include " +
resultText: "<a href='https://yoa.st/4lw' target='_blank'>SKU</a>: Not all your product variants have a SKU. <a href='https://yoa.st/4lx' target='_blank'>Include " +
"it if you can, as it will help search engines to better understand your content.</a>",
},
imageKeyphrase: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default class ProductSKUAssessment extends Assessment {
},
okay: {
withoutVariants: "%1$sSKU%3$s: Your product is missing a SKU. %2$sInclude it if you can, as it will help search engines to better understand your content.%3$s",
withVariants: "%1$sSKU%3$s: Not all your product variants have a SKU. You can add a SKU via the \"Variations\" tab in the Product data box. %2$sInclude it if you can, as it will help search engines to better understand your content.%3$s",
withVariants: "%1$sSKU%3$s: Not all your product variants have a SKU. %2$sInclude it if you can, as it will help search engines to better understand your content.%3$s",
},
};
defaultResultTexts.good = mapValues(
Expand Down

0 comments on commit 3a161f4

Please sign in to comment.