Skip to content

test(registry): add coverage parity for get_registered_page - #356

Merged
miss-yusrah merged 1 commit into
Stellar-TrustBridge:mainfrom
Mhazii:main
Aug 31, 2026
Merged

test(registry): add coverage parity for get_registered_page#356
miss-yusrah merged 1 commit into
Stellar-TrustBridge:mainfrom
Mhazii:main

Conversation

@Mhazii

@Mhazii Mhazii commented Aug 31, 2026

Copy link
Copy Markdown

Summary

This PR brings get_registered_page test coverage in line with the existing paginated registry APIs and clarifies when each pagination endpoint should be used.

The goal is to ensure all three pagination APIs behave consistently across common registry scenarios and to reduce the risk of indexers relying on an insufficiently tested endpoint.

Changes

  • Added parity tests for get_registered_page covering:
    • Empty registry
    • Single registered entry
    • Middle entry removal
    • Last-page boundaries
    • Pagination behavior across multiple pages
  • Added equivalent coverage for relevant get_registered_paginated and get_public_paginated scenarios where needed.
  • Verified admin vs public access behavior.
  • Verified the verified field is returned consistently.
  • Verified behavior while the contract is paused.
  • Added an API comparison table to docs/ABI.md explaining which pagination endpoint should be used and when.
  • Reviewed the existing implementations for behavioral differences.
  • Included regression tests for any bugs discovered during the parity review.

Testing

  • Ran registered page tests.
  • Ran pagination-related tests.
  • Verified empty and populated registry responses.
  • Verified pagination across first, middle, and last pages.
  • Verified removed entries do not cause users to be skipped unexpectedly.
  • Verified admin/public access differences.
  • Verified verified field behavior.
  • Verified paused-contract behavior.
  • Confirmed existing API results remain unchanged except where a tested bugfix was required.

Acceptance Criteria

  • get_registered_page has coverage parity with the paginated variants.
  • Empty, single-entry, middle-removal, and last-page scenarios are covered.
  • ABI documentation includes a clear which-API-to-use table.
  • Admin/public behavior is covered.
  • verified and pause behavior are covered.
  • No existing API behavior was changed unnecessarily.
  • Any discovered bugs are covered by regression tests.
  • Pagination tests pass successfully.

Validation

cargo test registered_page
cargo test paginat

closes #299 
closes #300 
closes #301 
closes #302 

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Mhazii Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@miss-yusrah
miss-yusrah merged commit 65220b4 into Stellar-TrustBridge:main Aug 31, 2026
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.

2 participants