Skip to content

feat: Increase unit test coverage across core modules#263

Open
kumaradityaraj wants to merge 2 commits into
open-workflow-specification:mainfrom
kumaradityaraj:unitTests
Open

feat: Increase unit test coverage across core modules#263
kumaradityaraj wants to merge 2 commits into
open-workflow-specification:mainfrom
kumaradityaraj:unitTests

Conversation

@kumaradityaraj

Copy link
Copy Markdown
Contributor

Closes #97

Description

Expand unit test coverage across the diagram editor and supporting utilities by adding tests for component rendering, state transitions, edge cases, error handling, and utility functions. These additions improve confidence in the editor's behavior while covering previously untested branches.

Changes

Sidebar

  • Added tests for:
    • Controlled open state changes
    • Mixed rendering scenarios
    • Additional sidebar interactions and edge cases

Graph utilities

  • Added coverage for:
    • Connection rewriting edge cases
    • Parent hierarchy traversal
    • Entry/exit node connection handling
    • Graphs that require no modifications

Task details

  • Added tests for:
    • Mixed field types
    • Nested object flattening edge cases
    • Array handling
    • Optional and missing properties
    • Metadata filtering

Validation errors

  • Added tests covering:
    • Additional validation filtering scenarios
    • Longest matching node ownership
    • General vs node-specific errors
    • Edge cases around field extraction

Workflow SDK

  • Added tests for:
    • Validation error parsing edge cases
    • Duplicate validation error removal
    • Invalid workflow parsing scenarios
    • Prototype pollution sanitization
    • Error handling fallbacks

DiagramEditorErrorBoundary

  • Added coverage for:
    • Error boundary reset behavior
    • Default and custom fallback rendering
    • Non-Error thrown values
    • Reset key edge cases

DiagramEditor

  • Added tests for:
    • Rendering under different editor states
    • Color mode handling
    • Parsing error fallback
    • Context and rendering edge cases

ErrorSection

  • Added tests for:
    • Mixed error items
    • Conditional field rendering
    • Error count rendering
    • Error list rendering

SidePanel

  • Added coverage for:
    • Node details rendering
    • Workflow information rendering
    • Sidebar header fallbacks
    • Selection hint
    • Missing selected node handling
    • Export action visibility

WorkflowInfoView

  • Added tests for:
    • Metadata rendering edge cases
    • Tags-only metadata
    • Empty tags handling
    • General error rendering
    • Optional metadata fields

Testing

  • Added comprehensive unit tests covering rendering, state transitions, error handling, and edge cases.
  • Verified all new and existing tests pass successfully.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for openworkflow-editor ready!

Name Link
🔨 Latest commit 8ab3c97
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6a589c3ff19dbb0008a9c476
😎 Deploy Preview https://deploy-preview-263--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.

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: Increase unit test coverage across core modules

1 participant