Skip to content

Review and increase unit test coverage - #544

Merged
lornakelly merged 2 commits into
open-workflow-specification:mainfrom
kumaradityaraj:unitTest
Nov 19, 2026
Merged

lornakelly merged 2 commits into
open-workflow-specification:mainfrom
kumaradityaraj:unitTest

Conversation

@kumaradityaraj

Copy link
Copy Markdown
Contributor

closes #232

Summary

Add unit tests for edge cases and behaviors across the editor packages:

  • Text editor: Verify provider registration failures are logged and onReady is not called.
  • Vanilla web component: Cover unsupported language fallback, attribute updates, and stale editor changes after host content resets.
  • Dual editor: Cover keyboard resizing steps and limits, plus pointer resizing on narrow screens.
  • i18n: Cover missing dictionaries, empty translations, locale detection fallbacks and preference ordering, and provider updates.
  • Language service: Verify whitespace-only JSON and YAML documents receive Hello World completions and code lenses.
  • Diagram editor: Verify PNG export excludes hidden nodes and clears temporary edge styles when PNG generation fails.

Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 10:03
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c051d7d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for openworkflow-editor ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c051d7d
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6afc2900ab9fd3b89cf16897
😎 Deploy Preview https://deploy-preview-544--openworkflow-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

🟡 Changes recommended

Two tests can pass despite the regressions they target: stacked resizing asserts the default split, and the locale-update test also changes dictionary identity.

2 open issues
What changed in this PR

Expands unit test coverage across the editor packages to strengthen regression protection for edge cases, supporting issue #232. The changes are limited to tests.

Changes:

  • Adds editor lifecycle, web-component attribute, stale-change, and pane-resizing tests.
  • Covers translation fallbacks, locale detection, and provider updates.
  • Adds whitespace-only document suggestions and PNG export filtering and cleanup tests.
File Description
packages/​text-editor/​tests/​language-service/​createTextEditorLanguageService.test.ts Tests provider registration failure handling.
packages/​open-workflow-diagram-editor/​tests/​lib/​exportPng.test.ts Tests hidden-node filtering and temporary edge-style cleanup.
packages/​language-service/​tests/​volar/​yaml/​completions.test.ts Tests Hello World completion for whitespace-only YAML.
packages/​language-service/​tests/​volar/​yaml/​code-lenses.test.ts Tests Hello World code lenses for whitespace-only YAML.
packages/​language-service/​tests/​volar/​json/​completions.test.ts Tests Hello World completion for whitespace-only JSON.
packages/​language-service/​tests/​volar/​json/​code-lenses.test.ts Tests Hello World code lenses for whitespace-only JSON.
packages/​i18n/​tests/​I18nProvider.test.tsx Tests translation updates after provider prop changes.
packages/​i18n/​tests/​detectLocale.test.ts Tests locale normalization, preference ordering, and fallbacks.
packages/​i18n/​tests/​createI18n.test.ts Tests missing dictionaries, empty translations, and selected locale.
packages/​dual-editor/​tests/​DualEditor.test.tsx Adds keyboard resizing and stacked-pane pointer tests.
examples/​vanilla-web-component/​tests/​dual-editor-element.test.ts Tests language fallback, attribute updates, and stale editor changes.

Review effort: Balanced

Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 10:14

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.

🟢 Approval recommended

No active review issues remain for the expanded edge-case test coverage.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@lornakelly lornakelly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kumaradityaraj

Copy link
Copy Markdown
Contributor Author

@lornakelly we can merge this pr

@lornakelly
lornakelly merged commit e2681e8 into open-workflow-specification:main Nov 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Review and increase unit test coverage

4 participants