Skip to content

test(jsonforms-renderers): cover ArrayControl conditional required asterisk - #122

Merged
ginaxu1 merged 1 commit into
mainfrom
test/jsonforms-array-conditional-required-asterisk
Oct 16, 2026
Merged

ginaxu1 merged 1 commit into
mainfrom
test/jsonforms-array-conditional-required-asterisk

Conversation

@ginaxu1

@ginaxu1 ginaxu1 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #118 (review): the unit tests mock useIsRequired, so conditional-array asterisk behaviour was not covered by a committed test.

Adds a jsdom render test with the real JsonForms provider for an allOf/if/then schema that requires the array, including when items are already present.

Test plan

  • vitest run src/renderers/ArrayControl.required.test.tsx
  • Packages CI green

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9f446256-2bfc-42d6-8dab-543ddc46a0f4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 github-actions Bot added the Package/jsonforms-renderers Changes to packages/jsonforms-renderers label Oct 16, 2026
@ginaxu1
ginaxu1 requested a review from sthanikan2000 October 16, 2026 06:22
@ginaxu1
ginaxu1 force-pushed the test/jsonforms-array-conditional-required-asterisk branch from ee218df to 395d0c1 Compare October 16, 2026 06:22
@ginaxu1 ginaxu1 added enhancement New feature or request skip-changelog Leave this PR out of the release notes labels Oct 16, 2026
…terisk

The ArrayControl unit suite mocks useIsRequired, so pin if/then array
required behaviour with a real JsonForms render test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ginaxu1
ginaxu1 force-pushed the test/jsonforms-array-conditional-required-asterisk branch from 395d0c1 to 3ef610f Compare October 16, 2026 06:34

@sthanikan2000 sthanikan2000 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is the test I suggested on #118.

@ginaxu1
ginaxu1 merged commit 02ed623 into main Oct 16, 2026
5 checks passed
@ginaxu1
ginaxu1 deleted the test/jsonforms-array-conditional-required-asterisk branch October 16, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Package/jsonforms-renderers Changes to packages/jsonforms-renderers skip-changelog Leave this PR out of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants