Skip to content

test: add e2e share integration tests for crit ↔ crit-web#303

Merged
tomasz-tomczyk merged 2 commits intomainfrom
e2e-share-tests
Apr 18, 2026
Merged

test: add e2e share integration tests for crit ↔ crit-web#303
tomasz-tomczyk merged 2 commits intomainfrom
e2e-share-tests

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • 18 integration test cases covering the full crit → crit-web share lifecycle
  • Orchestration script (scripts/e2e-share.sh) that builds crit, starts a local crit-web, runs tests, tears down
  • Fixed --output flag missing from the original TestShareSyncIntegration

Test coverage

Test What it covers
TestShareSyncIntegration Original: share, seed web comment, re-share, verify content + export
TestShareSyncNoComments Share with zero comments
TestShareSyncLineComments Line-scoped comments: body, position, scope on web
TestShareSyncFileComment File-scoped comment on web
TestShareSyncReviewLevelComments Review-level comments shared (#297 CLI path)
TestShareSyncMixedCommentTypes All 3 scopes together
TestShareSyncResolvedExcluded Resolved comments filtered out
TestShareSyncReshareNoDuplicates Re-share without duplication
TestShareSyncReshareNoChanges No-op when content unchanged
TestShareSyncFetchWebComments Web comments pulled into local .crit.json
TestShareSyncFetchWebCommentsNoDuplicates No duplicates after repeated syncs
TestShareSyncMultipleFiles Multi-file share
TestShareSyncMultipleRounds 3 rounds of share
TestShareSyncCommentWithReplies Threaded replies
TestShareSyncUnpublish Full unpublish + cleanup
TestShareSyncExport Export endpoint shape
TestShareSyncFetchReviewLevelWebComment Review-level web comments synced locally
TestShareSyncFullLifecycle Complete round-trip: local threads → share → web comments → fetch → re-share (preserved) → no duplicates

Usage

# Full automated run (builds crit, starts crit-web on :4001, runs tests, tears down)
make e2e-share

# Start crit-web for manual inspection
./scripts/e2e-share.sh --serve

# Run against already-running crit-web
./scripts/e2e-share.sh --skip-web

# Single test
./scripts/e2e-share.sh -run TestShareSyncFullLifecycle

Requires a local crit-web checkout at ../crit-web and PostgreSQL. Uses separate DB (crit_e2e) and port (4001) to avoid conflicting with dev setup.

Related

18 test cases covering the full share lifecycle: sharing with
various comment types (line/file/review-level), re-sharing without
duplicates, fetching web comments back locally, multi-file and
multi-round flows, threaded replies, unpublish, and export.

Includes orchestration script (scripts/e2e-share.sh) that builds
crit, starts a local crit-web on :4001 with a separate DB, runs
tests, and tears down. Also fixes --output flag missing from the
original TestShareSyncIntegration test.
@tomasz-tomczyk tomasz-tomczyk marked this pull request as ready for review April 18, 2026 09:03
@tomasz-tomczyk tomasz-tomczyk merged commit 4c9db96 into main Apr 18, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the e2e-share-tests branch April 18, 2026 09:11
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.

1 participant