Skip to content

test(frontend): add FormlyRepeatDndComponent unit tests#5595

Closed
Roshan3580 wants to merge 1 commit into
apache:mainfrom
Roshan3580:test/formly-repeat-dnd-5464
Closed

test(frontend): add FormlyRepeatDndComponent unit tests#5595
Roshan3580 wants to merge 1 commit into
apache:mainfrom
Roshan3580:test/formly-repeat-dnd-5464

Conversation

@Roshan3580

Copy link
Copy Markdown

Summary

Adds unit tests for FormlyRepeatDndComponent.

Closes #5464

Changes

  • Added repeat-dnd.component.spec.ts
  • Added a test to verify the component is created successfully
  • Added tests covering the early-return behavior when:
    • previousIndex === currentIndex
    • model is undefined
  • Added a test covering the happy path to verify:
    • model items are reordered correctly
    • field.fieldGroup items are reordered correctly
    • FormArray controls are reordered correctly
    • props.reorder() is called once

Testing

Executed:

yarn test --include='**/repeat-dnd.component.spec.ts'
yarn lint

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jun 9, 2026
@Yicong-Huang

Copy link
Copy Markdown
Contributor

@Roshan3580 please use our PR template. Please feel free to reopen once it is ready. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for FormlyRepeatDndComponent

2 participants