Skip to content

test: integration test for review-level reply round-trip#407

Merged
tomasz-tomczyk merged 1 commit intomainfrom
feat/review-level-reply-integration-test
Apr 30, 2026
Merged

test: integration test for review-level reply round-trip#407
tomasz-tomczyk merged 1 commit intomainfrom
feat/review-level-reply-integration-test

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

Adds `TestShareSyncFetchReviewLevelReplies` to the share integration suite. The test seeds a review-level comment on crit-web, adds two replies from the web side, re-shares to trigger a fetch, and verifies both replies land in local `ReviewComments` with author preserved.

Why

This locks the parity gap that surfaced today: crit-web's review-level cards were missing the reply UI even though the LiveView `add_reply` handler is generic and the API round-trip worked. The existing `TestShareSyncFetchReplies` covers line-anchored replies; `TestShareSyncFetchReviewLevelWebComment` covers a review-level body without replies. Neither caught the missing UI affordance.

This test wouldn't have caught the UI gap either (it's API-level), but it ensures the data path stays correct as we evolve the feature, and codifies "review-level replies must round-trip" as a tested invariant.

The crit-web UI fix landed in tomasz-tomczyk/crit-web#150.

Review

  • `./scripts/e2e-share.sh -run 'TestShareSyncFetchReviewLevelReplies'` passes
  • `gofmt`, `go vet` clean

Test plan

  • New test passes locally
  • Other integration tests not affected (helper additions are additive)

🤖 Generated with Claude Code

Adds TestShareSyncFetchReviewLevelReplies — seeds a review-level
(general/doc-anchored) comment on crit-web, replies twice from the
web side, re-shares to trigger a fetch, and verifies both replies
round-trip into local ReviewComments with author preserved.

Complements the existing TestShareSyncFetchReplies (line-anchored)
and TestShareSyncFetchReviewLevelWebComment (review-level body
without replies). Locks the parity gap surfaced when crit-web's
review-level cards were missing the reply UI even though the API
worked — the share integration tests had been passing all along
because they exercise the API directly, not the UI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 2623696 into main Apr 30, 2026
6 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the feat/review-level-reply-integration-test branch April 30, 2026 21:22
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.12%. Comparing base (453d259) to head (be806ce).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #407      +/-   ##
==========================================
+ Coverage   67.05%   67.12%   +0.06%     
==========================================
  Files          19       19              
  Lines        8221     8221              
==========================================
+ Hits         5513     5518       +5     
+ Misses       2278     2275       -3     
+ Partials      430      428       -2     
Flag Coverage Δ
e2e 34.36% <ø> (-0.11%) ⬇️
unit 63.15% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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