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

   Closes #5003.
   
   Three areas under-tested in the suite, all addressed here as one cohesive PR.
   
   ## Summary
   
   | File | Before | After | Δ |
   |---|---|---|---|
   | `download.service.spec.ts` | 8 active specs (all `it.skip(...)`) | 14 
active specs + 1 still-skipped (`createZip`, blocked by an unrelated `import * 
as JSZip` interop bug) | +14 active |
   | `code-editor.component.spec.ts` | 1 spec ("should create") | 9 specs 
(creation + language detection x 5 operator types + languageTitle derivation + 
2 cursor-style cases) | +8 |
   | `annotation-suggestion.component.spec.ts` | **didn't exist** | 6 specs 
(creation, default inputs, accept / decline emission, independence, input 
binding) | new file |
   
   Net: 3 files, +396 / −188 (most of the diff is the rewrite of the skipped 
download specs).
   
   ## What gets covered
   
   * `DownloadService` — `downloadSingleFile` (incl. default-filename fallback 
+ `isLogin=false`), `downloadDataset`, `downloadDatasetVersion`, 
`downloadWorkflow` (JSON shape), `downloadWorkflowsAsZip`, single-file 
`downloadOperatorsResult`, the `No files to download` error path, 
`getWorkflowResultDownloadability` HTTP wiring, plus the matching 
error-notification paths.
   * `CodeEditorComponent` — operator-type → language detection for the three 
V2 Python operator types and for plain Java / unknown types; the 
`languageTitle` formula; `getCoeditorCursorStyles` for hex and rgba colours.
   * `AnnotationSuggestionComponent` — input defaults, `onAccept` / `onDecline` 
event emission with independence between the two, and `@Input` binding.
   
   ## Notes on why one test stays skipped
   
   The multi-file `downloadOperatorsResult` path goes through `new JSZip()`, 
where `download.service.ts` does `import * as JSZip from "jszip"`. The CI build 
flags this as `Constructing "JSZip" will crash at run-time because it's an 
import namespace object`, and vitest reproduces it as `__vite_ssr_import_* is 
not a constructor`. The spec is left as `it.skip(...)` with a comment so it 
gets re-enabled when the source switches to a default import.
   
   ## Verification
   
   Tests pass on both branches under active development — confirms the test 
changes are stable AND the in-flight refactor on the v10 branch preserves the 
externally-observable behaviour these specs exercise.
   
   | Branch | Files | Tests |
   |---|---|---|
   | `main` | 66 passed / 2 skipped | 333 passed / 4 skipped / 2 todo |
   | `chore/monaco-lsp-v10` (#4997) | 65 passed / 2 skipped | 297 passed / 4 
skipped / 2 todo |
   
   The test-count delta between the two branches is unrelated PR drift (`main` 
has picked up extra non-monaco specs that haven't been merged into the v10 
branch yet); the spec files this PR adds run green on both.
   
   ## Test plan
   
   - [x] `yarn test` on `main` — 333 / 4 / 2
   - [x] `yarn test` on `chore/monaco-lsp-v10` — 297 / 4 / 2 (no new failures 
introduced)
   - [ ] CI green on this PR


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