Skip to content

[test]: Add unit test for getAutoNumberingFields returning empty array for non-CO table#8321

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

[test]: Add unit test for getAutoNumberingFields returning empty array for non-CO table#8321
rijulpoudel wants to merge 1 commit into
mainfrom
issue-8320

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8320

Summary by CodeRabbit

  • Tests
    • Added coverage confirming that auto-numbering returns no fields when none are available.

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

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

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

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


@coderabbitai

coderabbitai Bot commented Jul 17, 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: 017f8ebd-5a0d-460d-949d-9db13e2e2106

📥 Commits

Reviewing files that changed from the base of the PR and between a798f4c and cc32886.

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

📝 Walkthrough

Walkthrough

Adds Jest coverage confirming getAutoNumberingFields returns an empty array for tables.Locality, which has no auto-numberable fields.

Changes

Auto-numbering tests

Layer / File(s) Summary
Locality empty-field assertion
specifyweb/frontend/js_src/lib/components/FormMeta/__tests__/AutoNumbering.test.ts
Adds a test verifying that getAutoNumberingFields(tables.Locality) returns no field names.

Possibly related PRs

  • specify/specify7#8319: Adds related FormMeta test coverage for auto-numbering and bulk-clone validation involving Locality.
🚥 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 describes the added unit test for getAutoNumberingFields on a non-Collection Object table.
Linked Issues check ✅ Passed The change matches issue #8320 by adding a test for non-Collection Object auto-numbering behavior.
Out of Scope Changes check ✅ Passed The PR only adds a focused test case and includes no unrelated code changes.
Automatic Tests ✅ Passed The PR adds a Jest test covering the new empty-array case for getAutoNumberingFields on tables.Locality.
Testing Instructions ✅ Passed The new Jest tests clearly target getAutoNumberingFields and cover both CollectionObject and a non-autonumberable table (Locality), matching the affected component.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8320

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 20, 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]: Configure auto numbering on a per-field basis

2 participants