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

   ### What changes were proposed in this PR?
   
   Extends the existing `UserDatasetFileRendererComponent` spec (previously 
only the
   two `isPreviewSupported` checks, ~37% coverage) to cover the untested 
handlers.
   
   8 added tests cover:
   
   - `reloadFileContent` — flags an unsupported file type (no backend call); 
flags an oversized file before loading; retrieves a supported file via 
`DatasetService.retrieveDatasetVersionSingleFile(filePath, isLogin)` and 
switches on the matching display.
   - Error handlers — `onFileLoadingError` / `onFileSizeNotLoadable` / 
`onFileTypePreviewUnsupported` each set their respective error flag (and clear 
the displays).
   - Display toggles — `toggleImageModal` flips `showImageModal`; 
`turnOffAllDisplay` resets every display and error flag.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6533
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; the failure path 
was
   verified by deliberately breaking an assertion to confirm the suite goes 
red):
   
   ```
   ng test --watch=false --include 
src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-file-renderer/user-dataset-file-renderer.component.spec.ts
   # Test Files 1 passed (1) | Tests 10 passed (10)
   prettier --write <spec>   # unchanged
   eslint  <spec>            # clean
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
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]

Reply via email to