Skip to content

Expand spec coverage for DownloadService, CodeEditorComponent, and AnnotationSuggestionComponent #5003

@aglinxinyuan

Description

@aglinxinyuan

Task Summary

Three areas under-tested in the current frontend spec suite:

Target Today Why under-tested
DownloadService 8 active it.skip(...) blocks All written against the Jasmine done() / fail() callback shape, which the vitest runner doesn't accept (#4861).
CodeEditorComponent a single should create smoke test Most of the component's behaviour (operator-type → language detection, language-title formatting, coeditor cursor styles) goes untested.
AnnotationSuggestionComponent no spec at all The two @Output() event emitters are unverified.

Plan

  • DownloadService: rewrite the eight it.skip(...) blocks with firstValueFrom / await expect(...).rejects.toThrow(...) against the same mocks, then add new cases for downloadWorkflow, downloadOperatorsResult (single-file path), getWorkflowResultDownloadability, default-filename fallback, and isLogin=false plumbing.
  • CodeEditorComponent: add language-detection cases for the three V2 Python operator types + Java + unknown, assert languageTitle formatting, and exercise getCoeditorCursorStyles for valid clientId / colour shapes.
  • AnnotationSuggestionComponent: new spec file. Cover input defaults, accept / decline event emission, and that the two emitters are independent.

Both branches under active development (main and the chore/monaco-lsp-v10 v10 upgrade in #4997) should run the new specs to completion.

Verification plan

  • yarn test on main — all new specs pass
  • yarn test on chore/monaco-lsp-v10 — same specs pass against the v10-rewritten editor / debugger code
  • No existing specs regress

Task Type

  • Testing / QA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions