Skip to content

[test]: show selected row attachment#8354

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

[test]: show selected row attachment#8354
rijulpoudel wants to merge 1 commit into
mainfrom
issue-8351

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8351

Summary by CodeRabbit

  • Tests
    • Added automated coverage for attachment thumbnail loading and display when selecting WorkBench rows.
    • Verified that changing selections updates the displayed attachment and removes the previously selected image.
    • Confirmed attachment requests and table selection interactions occur as expected.

@coderabbitai

coderabbitai Bot commented Jul 24, 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: 158af186-928e-4ea5-8e3e-1f4681b5b16e

📥 Commits

Reviewing files that changed from the base of the PR and between 1669426 and d87d3af.

📒 Files selected for processing (1)
  • specifyweb/frontend/js_src/lib/components/WorkBench/__tests__/WbAttachmentsPreview.test.tsx

📝 Walkthrough

Walkthrough

Changes

WorkBench attachment preview selection test

Layer / File(s) Summary
Attachment preview selection test
specifyweb/frontend/js_src/lib/components/WorkBench/__tests__/WbAttachmentsPreview.test.tsx
Mocks dataset attachment requests and Handsontable behavior, then verifies the selected row’s thumbnail loads, selection changes fetch the matching attachment, the previous image is removed, and expected cell coordinates are queried.
🚥 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 clearly summarizes the main change: a test for showing the selected row's attachment.
Linked Issues check ✅ Passed The added test verifies that selecting a WorkBench row displays its matching attachment, which satisfies #8351.
Out of Scope Changes check ✅ Passed The PR only adds a focused test file for the requested attachment-selection behavior.
Automatic Tests ✅ Passed The PR adds a Jest/RTL test suite for WbAttachmentsPreview that verifies row selection shows the matching attachment thumbnail.
Testing Instructions ✅ Passed The added test is explicit and targets WbAttachmentsPreview’s selection-to-attachment flow, including hooks, row lookup, and thumbnail updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8351

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.

@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=-85

--- 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=830

--- 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=-108

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


@rijulpoudel

rijulpoudel commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit Full Review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

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]: Show the matching attachment for the selected WorkBench row

1 participant