Skip to content

Testing: Phase 2 - Entry lifecycle (CRUD + auditing) #97

@fegge

Description

@fegge

Parent issue: #90

Overview

P1 priority tests for entry CRUD operations, location management, and file auditing.

Tests: Entry CRUD (17 tests)

Test Type
createOrEditEntry creates new finding +
createOrEditEntry creates new note +
createOrEditEntry edits existing entry +
createOrEditEntry prompts for input +
createOrEditEntry cancels on empty/escape -
deleteFinding removes entry +
deleteFinding removes all locations +
deleteFinding handles not found -
resolveFinding moves to resolved +
resolveFinding preserves data +
restoreFinding moves back to active +
restoreFinding handles not found -
restoreAllResolvedFindings restores all +
restoreAllResolvedFindings filters by author +
deleteAllResolvedFindings clears list +
deleteAllResolvedFindings filters by author +

Tests: Location Management (10 tests)

Test Type
addRegionToAnEntry adds location +
addRegionToAnEntry uses current selection +
deleteLocation removes location +
deleteLocation deletes entry when last +
getActiveSelectionLocation single/multi-line +
getActiveSelectionLocation empty/end-of-file +
getIntersectingTreeEntryIndex finds overlap +
getIntersectingTreeEntryIndex returns -1 -

Tests: File Auditing (13 tests)

Test Type
toggleAudited marks/unmarks file +
toggleAudited clears partial audits +
toggleAudited updates day log +
toggleAudited sibling folder promotion +
addPartiallyAudited adds region +
addPartiallyAudited uses selection +
addPartiallyAudited skips if fully audited -
mergePartialAudits overlapping regions +
mergePartialAudits adjacent regions +
mergePartialAudits disjoint regions +
mergePartialAudits single/empty +

Files

  • test/unit/entryCrud.test.ts
  • test/unit/locations.test.ts
  • test/unit/auditing.test.ts

Total: 40 tests

Metadata

Metadata

Assignees

Labels

testingTest-related issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions