Skip to content

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

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test/frontend-workspace-specs
Open

aglinxinyuan wants to merge 1 commit 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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.56%. Comparing base (0aea3df) to head (1d46fcf).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9536      +/-   ##
============================================
- Coverage     91.57%   91.56%   -0.01%     
  Complexity     5157     5157              
============================================
  Files          1300     1300              
  Lines         58092    58092              
  Branches       7615     7615              
============================================
- Hits          53195    53194       -1     
  Misses         2959     2959              
- Partials       1938     1939       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 0aea3df
agent-service 99.56% <ø> (ø) Carriedforward from 0aea3df
amber 85.42% <ø> (ø) Carriedforward from 0aea3df
computing-unit-managing-service 63.88% <ø> (ø) Carriedforward from 0aea3df
config-service 87.50% <ø> (ø) Carriedforward from 0aea3df
file-service 82.16% <ø> (ø) Carriedforward from 0aea3df
frontend 96.45% <ø> (-0.01%) ⬇️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 0aea3df
pyamber 98.38% <ø> (ø) Carriedforward from 0aea3df
result-service 85.71% <ø> (ø) Carriedforward from 0aea3df
workflow-compiling-service 78.30% <ø> (ø) Carriedforward from 0aea3df

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

This branch has not been deployed

No deployments
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

3 participants