Skip to content

test: add unit tests for RowModalComponent (#5469)#5580

Open
Neilk1021 wants to merge 3 commits into
apache:mainfrom
Neilk1021:test/row-modal-spec-5469
Open

test: add unit tests for RowModalComponent (#5469)#5580
Neilk1021 wants to merge 3 commits into
apache:mainfrom
Neilk1021:test/row-modal-spec-5469

Conversation

@Neilk1021

@Neilk1021 Neilk1021 commented Jun 9, 2026

Copy link
Copy Markdown

What changes were proposed in this PR?

This PR adds a comprehensive unit test suite (result-panel-modal.component.spec.ts) for the RowModalComponent.

The newly introduced test cases verify that:

  • The component instantiates successfully with injection tokens mapped correctly (NZ_MODAL_DATA, NzModalRef).
  • The lifecycle method ngOnChanges() executes smoothly to resolve nested service streams through WorkflowResultService and PanelResizeService.
  • The internal property currentDisplayRowData is accurately populated with target row values evaluated from mock RxJS data streams.

Any related issues, documentation, discussions?

Closes #5469

How was this PR tested?

This PR was tested by executing the newly added unit test suite (result-panel-modal.component.spec.ts) to ensure all assertions pass successfully, validating both the dependency injection setup and the reactive stream logic.

Was this PR authored or co-authored using generative AI tooling?

No

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

chenlica commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@xuang7 Can you review this PR?

@xuang7 xuang7 self-requested a review June 9, 2026 06:07
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.21%. Comparing base (564ccdb) to head (89f54a9).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5580      +/-   ##
============================================
+ Coverage     52.17%   52.21%   +0.03%     
  Complexity     2482     2482              
============================================
  Files          1068     1068              
  Lines         41311    41311              
  Branches       4439     4439              
============================================
+ Hits          21556    21570      +14     
+ Misses        18490    18477      -13     
+ Partials       1265     1264       -1     
Flag Coverage Δ *Carryforward flag
access-control-service 64.61% <ø> (ø) Carriedforward from 564ccdb
agent-service 33.76% <ø> (ø) Carriedforward from 564ccdb
amber 53.28% <ø> (ø) Carriedforward from 564ccdb
computing-unit-managing-service 1.65% <ø> (ø) Carriedforward from 564ccdb
config-service 56.06% <ø> (ø) Carriedforward from 564ccdb
file-service 38.32% <ø> (ø) Carriedforward from 564ccdb
frontend 46.50% <ø> (+0.08%) ⬆️
pyamber 90.72% <ø> (ø) Carriedforward from 564ccdb
python 90.75% <ø> (ø) Carriedforward from 564ccdb
workflow-compiling-service 58.69% <ø> (ø) Carriedforward from 564ccdb

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xuang7

xuang7 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! I think this one has the same issues as #5578. Could you please apply the same fixes here as well?

@Neilk1021

Copy link
Copy Markdown
Author

@xuang7 Done! I've removed the UTF-8 BOM and the redundant Vitest imports in the latest commit to match the fixes from the other PR. 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 RowModalComponent (result-panel-modal)

4 participants