Skip to content

test(frontend): share workspace spec fixtures - #9536

Merged
aglinxinyuan merged 4 commits into
apache:mainfrom
aglinxinyuan:test/frontend-workspace-specs
Nov 27, 2026
Merged

aglinxinyuan merged 4 commits into
apache:mainfrom
aglinxinyuan:test/frontend-workspace-specs

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Consolidate repeated TestBed mounting, mock-reader, stream-stub, console-frame, and result-exportation fixtures across 7 Angular workspace unit-test specs under frontend/src/app/workspace/ (+1,355 / −2,116 lines) without modifying production code or test assertions:

  • Computing unit selection (computing-unit-selection.component.spec.ts): Extracts createMetaStream, makeLockedPve, bootWithSelectedStream, unified bootWithMetadata / openEditModal / makeWarehouse fixtures, and inline-edit helpers across all 214 cases.
  • Hugging Face media uploads (hugging-face-audio-upload.component.spec.ts, hugging-face-image-upload.component.spec.ts): Consolidates mock file-reader fixtures, media selection helpers, and clear/error assertions across the audio (30 cases) and image (46 cases) upload specs.
  • Result exportation (result-exportation.component.spec.ts, workflow-result-export.service.spec.ts): Extracts dialog TestBed mounting, dataset/flag builders, operator setup, alert assertions, availability checks, and table-driven blocked/warning/error scenarios across the component (44 cases) and service (35 cases) specs.
  • Console frame & port property editor (console-frame.component.spec.ts, port-property-edit-frame.component.spec.ts): Shares TestBed configuration, timing/scroll/click probes, and console entry fixtures in ConsoleFrameComponent (51 cases), plus port graph stubs, property/display-name event emitters, and Quill editor Enter-commit helpers in PortPropertyEditFrameComponent (36 cases).

Any related issues, documentation, discussions?

Closes #9535.

How was this PR tested?

Verified on Node 24 (yarn-4.14.1.cjs install --immutable --inline-builds) after final commit 1d46fcfa73:

node ./node_modules/prettier-eslint-cli/dist/index.js --list-different \
  src/app/workspace/component/hugging-face-audio-upload/hugging-face-audio-upload.component.spec.ts \
  src/app/workspace/component/hugging-face-image-upload/hugging-face-image-upload.component.spec.ts \
  src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts \
  src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.spec.ts \
  src/app/workspace/component/result-exportation/result-exportation.component.spec.ts \
  src/app/workspace/component/result-panel/console-frame/console-frame.component.spec.ts \
  src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
node ./node_modules/eslint/bin/eslint.js \
  src/app/workspace/component/hugging-face-audio-upload/hugging-face-audio-upload.component.spec.ts \
  src/app/workspace/component/hugging-face-image-upload/hugging-face-image-upload.component.spec.ts \
  src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts \
  src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.spec.ts \
  src/app/workspace/component/result-exportation/result-exportation.component.spec.ts \
  src/app/workspace/component/result-panel/console-frame/console-frame.component.spec.ts \
  src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts
node ./node_modules/typescript/bin/tsc -p src/tsconfig.app.json --noEmit
node ./node_modules/typescript/bin/tsc -p src/tsconfig.spec.json --noEmit

Observed result: prettier-eslint --list-different, eslint, and both strict tsc --noEmit checks exited 0.

node --max-old-space-size=8192 ./node_modules/@angular/cli/bin/ng.js test --watch=false --progress=false \
  --include src/app/workspace/component/hugging-face-audio-upload/hugging-face-audio-upload.component.spec.ts \
  --include src/app/workspace/component/hugging-face-image-upload/hugging-face-image-upload.component.spec.ts \
  --include src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts \
  --include src/app/workspace/component/property-editor/port-property-edit-frame/port-property-edit-frame.component.spec.ts \
  --include src/app/workspace/component/result-exportation/result-exportation.component.spec.ts \
  --include src/app/workspace/component/result-panel/console-frame/console-frame.component.spec.ts \
  --include src/app/workspace/service/workflow-result-export/workflow-result-export.service.spec.ts

Observed result: 7 test files passed (456 passed, 0 failed, 0 skipped).

node --max-old-space-size=8192 ./node_modules/@angular/cli/bin/ng.js test --watch=false --progress=false

Observed result: 255 test files passed (7,387 passed, 1 skipped in operator-property-edit-frame.component.spec.ts, 0 failed).

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

Generated-by: Antigravity (Gemini 4 Neon)

Consolidate repeated TestBed setup, mock-reader, stream stub, and export scenario helpers across 7 frontend workspace unit-test specs (+1,355 / -2,116 lines) without altering production code or test assertions.
Copilot AI balanced review requested due to automatic review settings November 19, 2026 05:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @kz930
    You can notify them by mentioning @kz930 in a comment.

@aglinxinyuan
aglinxinyuan requested a review from mengw15 November 19, 2026 05:30
@codecov-commenter

codecov-commenter commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.77%. Comparing base (410c55e) to head (b5e1cc9).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9536      +/-   ##
============================================
- Coverage     91.77%   91.77%   -0.01%     
+ Complexity     5136     5134       -2     
============================================
  Files          1308     1308              
  Lines         58079    58079              
  Branches       7558     7558              
============================================
- Hits          53304    53301       -3     
- Misses         2888     2889       +1     
- Partials       1887     1889       +2     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from aa5fe9d
agent-service 99.56% <ø> (ø) Carriedforward from aa5fe9d
amber 85.94% <ø> (-0.02%) ⬇️ Carriedforward from aa5fe9d
computing-unit-managing-service 63.81% <ø> (ø) Carriedforward from aa5fe9d
config-service 87.50% <ø> (ø) Carriedforward from aa5fe9d
file-service 82.16% <ø> (ø) Carriedforward from aa5fe9d
frontend 96.45% <ø> (ø)
notebook-migration-service 83.84% <ø> (ø) Carriedforward from aa5fe9d
pyamber 98.70% <ø> (ø) Carriedforward from aa5fe9d
result-service 86.48% <ø> (ø) Carriedforward from aa5fe9d
workflow-compiling-service 80.90% <ø> (ø) Carriedforward from aa5fe9d

*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.

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 November 25, 2026 08:56

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! One optional suggestion and two nits below.

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Nov 27, 2026
Merged via the queue into apache:main with commit f3fbe19 Nov 27, 2026
25 checks passed
@aglinxinyuan
aglinxinyuan deleted the test/frontend-workspace-specs branch November 27, 2026 00:57
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.

Share frontend workspace spec test fixtures

4 participants