aglinxinyuan opened a new pull request, #9536:
URL: https://github.com/apache/texera/pull/9536

   ### 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`:
   
   ```bash
   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`.
   
   ```bash
   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).
   
   ```bash
   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)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] test(frontend): sh... aglinxinyuan (via GitHub) via notifications

Reply via email to