Skip to content

[test]: verify needsSaved propagates from independent collection to p…#8252

Open
rijulpoudel wants to merge 1 commit into
mainfrom
issue-8241
Open

[test]: verify needsSaved propagates from independent collection to p…#8252
rijulpoudel wants to merge 1 commit into
mainfrom
issue-8241

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8241

Summary by CodeRabbit

  • Bug Fixes
    • Improved change tracking for independent records so edits to a child item correctly mark the parent record as needing save.
    • Saving the parent record now clears its pending-change status as expected.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ea21139-b3f9-4d24-8b57-39ce09a997cc

📥 Commits

Reviewing files that changed from the base of the PR and between b25f89f and 3e334cb.

📒 Files selected for processing (1)
  • specifyweb/frontend/js_src/lib/components/DataModel/__tests__/resourceApi.test.ts

📝 Walkthrough

Walkthrough

This PR adds a new test suite to resourceApi.test.ts that verifies needsSaved propagation from an IndependentCollection resource to its parent Accession, confirming the parent is marked needsSaved on child changes and cleared after saving.

Changes

Independent resource change propagation test

Layer / File(s) Summary
Test setup and propagation assertions
specifyweb/frontend/js_src/lib/components/DataModel/__tests__/resourceApi.test.ts
Imports Accession type and adds a test suite stubbing API calls, linking an IndependentCollection to a parent Accession via storeIndependent, and asserting needsSaved propagates to the parent (not the child) and clears after save.

Possibly related issues

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and matches the test-focused change about needsSaved propagation from an independent collection to its parent.
Linked Issues check ✅ Passed The added test directly addresses issue #8241 by verifying needsSaved propagates from an independent collection to the parent.
Out of Scope Changes check ✅ Passed The changes stay within the requested test coverage and do not introduce unrelated code or behavior changes.
Automatic Tests ✅ Passed The PR adds an automated test suite covering needsSaved propagation from an independent collection to its parent.
Testing Instructions ✅ Passed The new test clearly targets CollectionObject↔Accession independent propagation, matches rgetCollection/storeIndependent behavior, and verifies parent needsSaved clears on save.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8241

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rijulpoudel rijulpoudel requested a review from CarolineDenis July 2, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

[tests]: verify needsSaved propagates from independent collection to parent

1 participant