Skip to content

[test]: Delete unmapped columns from a new WorkBench dataset#8337

Open
rijulpoudel wants to merge 4 commits into
mainfrom
issue-8336
Open

[test]: Delete unmapped columns from a new WorkBench dataset#8337
rijulpoudel wants to merge 4 commits into
mainfrom
issue-8336

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8336

Summary by CodeRabbit

  • Tests
    • Added coverage for deleting unmapped columns while preserving mapped columns.
    • Added coverage confirming the delete-unmapped control appears only when applicable.
    • Verified the control triggers the expected clearing action once.

@github-actions

Copy link
Copy Markdown

Warning

One or more dependencies are approaching or past End-of-Life.
Please plan upgrades accordingly.

STATUS=WARNING
NODE_VERSION=20
NODE_CYCLE=20
EOL_DATE=2026-04-30
DAYS_REMAINING=-82

--- Node.js ---
Version: 20
EOL: 2026-04-30
Status: WARNING

STATUS=OK
PYTHON_VERSION=3.12
PYTHON_CYCLE=3.12
EOL_DATE=2028-10-31
DAYS_REMAINING=833

--- Python ---
Version: 3.12
EOL: 2028-10-31
Status: OK

STATUS=WARNING
DJANGO_VERSION=4.2
DJANGO_CYCLE=4.2
EOL_DATE=2026-04-07
DAYS_REMAINING=-105

--- Django ---
Version: 4.2
EOL: 2026-04-07
Status: WARNING


@coderabbitai

coderabbitai Bot commented Jul 21, 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: 43187577-8894-4691-a12a-6b23d5634334

📥 Commits

Reviewing files that changed from the base of the PR and between a255ef8 and 7890f83.

📒 Files selected for processing (2)
  • specifyweb/frontend/js_src/lib/components/WbPlanView/__tests__/Mapper.test.tsx
  • specifyweb/frontend/js_src/lib/components/WbPlanView/__tests__/MapperComponents.test.tsx

📝 Walkthrough

Walkthrough

Adds React Testing Library coverage for deleting unmapped Mapper columns and for the delete-unmapped control’s visibility and callback behavior.

Changes

Unmapped Column Deletion

Layer / File(s) Summary
Mapper deletion behavior
specifyweb/frontend/js_src/lib/components/WbPlanView/__tests__/Mapper.test.tsx
Tests that deleting unmapped columns removes the unmapped column while preserving a mapped column.
Delete control state and callback
specifyweb/frontend/js_src/lib/components/WbPlanView/__tests__/MapperComponents.test.tsx
Tests button visibility based on columnsNotSaved and verifies that clicking the button calls onClear once.
🚥 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 matches the main change: adding tests for deleting unmapped columns in WorkBench.
Linked Issues check ✅ Passed The new tests cover availability, hidden state, execution, and deletion behavior for unmapped columns as requested in #8336.
Out of Scope Changes check ✅ Passed The PR only adds test coverage for the linked WorkBench behavior and includes no unrelated code changes.
Automatic Tests ✅ Passed PR adds automatic Jest/RTL tests in tests covering delete-unmapped behavior and control-panel visibility/callbacks.
Testing Instructions ✅ Passed New tests clearly target Mapper and MappingsControlPanel, covering delete-unmapped visibility and behavior for unsaved vs saved columns.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8336

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.

@CarolineDenis CarolineDenis added this to the 7.12.1 milestone Jul 22, 2026
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.

[test]: Delete unmapped columns from a new WorkBench dataset

2 participants