Skip to content

Add tests for the indexables-pages slice of llms.txt#22429

Merged
leonidasmi merged 4 commits intofeature/llms-txt-phase-2from
add-tests-indexables-pages
Jul 14, 2025
Merged

Add tests for the indexables-pages slice of llms.txt#22429
leonidasmi merged 4 commits intofeature/llms-txt-phase-2from
add-tests-indexables-pages

Conversation

@igorschoester
Copy link
Copy Markdown
Contributor

@igorschoester igorschoester commented Jul 14, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Adds tests for the indexables-pages slice of llms.txt.

Relevant technical choices:

  • see commits and messages

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Devs:

  • Run the JS test suite with code coverage: yarn workspace @yoast/wordpress-seo jest --coverage "tests/settings/store/indexable-pages.test.js"
  • Verify it has 100% coverage (though not 100% branches, too many safety checks)

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

  • Tests, and 1 dependency array addition that is so standard there is no need.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

* slug could end up as "undefined", now that would be ""
* use same fallback logic for the id in the name as in the id itself
So new queries can update existing records
Not all branches are covered, but pretty good still
@igorschoester igorschoester added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jul 14, 2025
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2b704a025393e64c6a6fded2682ea29ba7b063ce

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 64 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.4%) to 53.669%

Files with Coverage Reduction New Missed Lines %
packages/js/src/settings/helpers/search.js 6 15.0%
packages/js/src/settings/store/index.js 6 0.0%
packages/js/src/settings/routes/site-features.js 13 0.0%
packages/js/src/settings/app.js 15 0.0%
packages/js/src/settings/initialize.js 24 0.0%
Totals Coverage Status
Change from base Build f84a8ac44b0411b1a4b1db1c6c4fff6b506aff62: 0.4%
Covered Lines: 30553
Relevant Lines: 57926

💛 - Coveralls

@leonidasmi
Copy link
Copy Markdown
Contributor

CR and acceptance is ✅

@leonidasmi leonidasmi merged commit 3b3a5d6 into feature/llms-txt-phase-2 Jul 14, 2025
23 checks passed
@leonidasmi leonidasmi deleted the add-tests-indexables-pages branch July 14, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants