test(frontend): add FormlyRepeatDndComponent unit tests - #5632
Merged
Conversation
Contributor
Author
|
/request-review @Ma77Ball |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5632 +/- ##
============================================
+ Coverage 53.07% 53.23% +0.16%
+ Complexity 2657 2504 -153
============================================
Files 1094 1076 -18
Lines 42286 41665 -621
Branches 4541 4503 -38
============================================
- Hits 22444 22182 -262
+ Misses 18530 18174 -356
+ Partials 1312 1309 -3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xuang7
approved these changes
Jun 12, 2026
xuang7
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left one minor comment.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jun 15, 2026
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
### What changes were proposed in this PR? This PR adds frontend unit tests for `FormlyRepeatDndComponent`. The new spec verifies that: * The component is created successfully. * onDrop does nothing when previousIndex == currentIndex. * onDrop does nothing when model is undefined. * onDrop reorders model, field.fieldGroup, and formControl on the happy path. * props.reorder is called after a successful reorder. This improves test coverage for the drag-and-drop reorder behavior without changing existing component behavior. ### Any related issues, documentation, discussions? Closes apache#5464 ### How was this PR tested? Ran the following command locally from the frontend directory: yarn test --include='**/repeat-dnd.component.spec.ts' The test passed successfully with 1 test file passed and 4 tests passed. Also ran: yarn lint ^ yarn lint completed successfully. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: ChatGPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
This PR adds frontend unit tests for
FormlyRepeatDndComponent.The new spec verifies that:
This improves test coverage for the drag-and-drop reorder behavior without changing existing component behavior.
Any related issues, documentation, discussions?
Closes #5464
How was this PR tested?
Ran the following command locally from the frontend directory:
yarn test --include='**/repeat-dnd.component.spec.ts'
The test passed successfully with 1 test file passed and 4 tests passed.
Also ran:
yarn lint
^ yarn lint completed successfully.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: ChatGPT