Skip to content

feat: Implement test suite that validates example rendering in devui's openworkflow editor #804

Description

@domhanak

The problem

As a quarkus-flow maintainer...

I want to ensure that the examples we share in documentation, workshop and cookbooks are being rendered in the open workflow editor.
I want to have a suite that validates the rendering work when we update the version of editor any other code changes is done to the integration code.
i want to have regression coverage for the rendering, in case one example is not being render I want to see the test fail so we can investigate what broke it and act accordingly.

Problem Statement

The Dev UI embeds the @openworkflowspec/diagram-editor React component inside a Lit Web Component (qwc-openworkflowspec-diagram-editor) that is served from an esbuild-compiled bundle. The integration layer between the Quarkus backend and the editor involves several steps:

  1. The Java workflow (Java DSL or YAML file) is registered in WorkflowApplication at boot.
  2. The Dev UI frontend fetches the definition via the getWorkflowDefinition JSON-RPC method.
  3. The backend serialises the Workflow object to JSON (WorkflowFormat.JSON.mapper().writeValueAsString(workflow)).
  4. The OpenWorkflowSpecDiagramEditorElement Lit component receives the JSON string and passes it as the content prop to the React DiagramEditor.
  5. The DiagramEditor renders the workflow graph in the browser DOM.

There is currently no automated test that validates this full round-trip end-to-end, specifically:

  • That the rendered DOM nodes match the workflow's tasks by name and type.
  • That the JSON serialised by the backend is semantically equivalent to the original workflow definition (no field loss, no mutation introduced by the integration layer).
  • That the original Workflow Java object is not mutated by the serialisation or RPC call (side-effect check).

WorkflowDiagramEditorIT already exists and uses raw com.microsoft.playwright API directly, but it does not yet cover the full round-trip, does not use the quarkus-playwright extension, and does not validate semantic equivalence of the definition.


Proposed solution / API

See ADR at PR-805

Alternatives considered

No response

Area(s)

  • Runtime / Engine
  • DSL / API
  • Dev UI / Mermaid
  • Persistence
  • Messaging / CloudEvents
  • Observability (Micrometer / OTEL)
  • Docs & examples
  • Agentic AI

Impact & scope

We benefit as we have a test validate important integration seam or embedding wiring of the editor in quarkus flow

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions