Skip to content

Add integration test for the invoice search endpoint returning results ranked by relevance when query matches both title and description #205

Description

@Chucks1093

Summary

The invoice search endpoint should rank results with a title match higher than a description-only match. An integration test should seed invoices where the query appears in different fields and confirm the ranking order.

Scope

  • Seed invoice A with the query in the title, invoice B with the query only in the description
  • Call the search endpoint and assert invoice A appears before invoice B
  • Seed invoice C with the query in both title and description and assert it ranks at or above invoice A
  • Assert a query matching no invoices returns an empty array
  • Assert the search is case-insensitive

Acceptance Criteria

  • Title match ranked above description-only match
  • Title+description match ranked at or above title-only match
  • No match returns empty array
  • Search is case-insensitive

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions