Skip to content

Re-enable test_indexing_item_not_front and cover non-front items - #400

Merged
benoit74 merged 1 commit into
openzim:mainfrom
mcwanza:fix-258
Nov 12, 2026
Merged

benoit74 merged 1 commit into
openzim:mainfrom
mcwanza:fix-258

Conversation

@mcwanza

@mcwanza mcwanza commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • test_indexing_item_not_front was skipped since libzim stopped matching what it asserted. It is re-enabled and now asserts what libzim 3.13 does: a non-front item gets no suggestions, but its IndexData content and title are still found by full-text search.
  • Added test_indexing_html_not_front_custom: a non-front text/html item with custom IndexData behaves the same way.
  • Added test_indexing_html_not_front_with_libzim: a non-front text/html item without IndexData is indexed by libzim itself, from the document body and the item title rather than the <title> tag.
  • Tests only, no change to the library. As discussed in the issue, libzim's current behavior is treated as the spec.
  • Added a ### Changed entry to the changelog.

Fixes #258

The test was skipped because its comments described libzim behavior
that no longer holds: with libzim 3.13 a non-front item gets no
suggestions at all, while full-text search still finds it.

As agreed in the issue, treat libzim's current behavior as the spec.
Assert it in the re-enabled test and add two tests for a non-front
text/html item, one with custom IndexData and one indexed by libzim
itself.
@mcwanza
mcwanza marked this pull request as ready for review November 9, 2026 16:37

@benoit74 benoit74 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d1deb81) to head (63d16ff).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #400   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         2947      2947           
  Branches       452       452           
=========================================
  Hits          2947      2947           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benoit74
benoit74 merged commit dbb7534 into openzim:main Nov 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_indexing_item_not_front test is failing

2 participants