Skip to content

test: address acceptance test coverage gaps #71

@viv

Description

@viv

Summary

Track and address the remaining acceptance test coverage gaps identified in docs/test-coverage-gaps.md. Several gaps have been covered over time, but 13 remain open.

Context

The test coverage gaps document was extracted from the component specification's Appendix A. It captures areas that are specified in the component spec but have incomplete or missing test coverage.

Several gaps have since been covered (orphaned annotations, context matching fallback, page note edit/cancel, panel tab counts, Clear All auto-reset). The items below are the remaining open gaps.

Open Gaps in Existing Tests (4)

  • Page note edit to empty text — editing a page note to empty text is untested (the cancel path is covered but not the empty-text edge case)
  • Toast notification content — export test checks toast visibility but not the exact message text ("Copied to clipboard!" vs "Export failed")
  • Popup positioning fallback logic — no test for above/below fallback or horizontal clamping to viewport edges; only a broad 200px proximity check exists
  • Highlight removal normalises text nodes — deletion test doesn't verify parent.normalize() was called and adjacent text nodes were merged

Missing Test Scenarios (9)

  • Clipboard API fallback — no test for execCommand('copy') fallback when navigator.clipboard is unavailable
  • Concurrent API requests — no test for rapid mixed operations (create + delete simultaneously)
  • External JSON file editing — no test verifying that external edits to inline-review.json are picked up on reload
  • Storage file permissions — no test for when the JSON file exists but is not writable
  • API error responses — no test for client behaviour when the API returns 500 or error status codes
  • Multiple browser tabs — no test for annotations created in multiple tabs with potential client-side cache staleness
  • Annotation on inline elements — no test for text selection spanning <strong>, <em>, <a> within the same paragraph
  • Very large store performance — no test for performance with hundreds of annotations
  • Panel scroll position — no test for scroll position preservation when switching tabs or scrolling long lists

Source Document

Full details and cross-references: docs/test-coverage-gaps.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions