Skip to content

test: cover default canvas style for vertices without a schema type (#1779) - #2202

Open
hdp01 wants to merge 1 commit into
aws:mainfrom
hdp01:fix/1779-blank-node-icon
Open

hdp01 wants to merge 1 commit into
aws:mainfrom
hdp01:fix/1779-blank-node-icon

Conversation

@hdp01

@hdp01 hdp01 commented Sep 21, 2026

Copy link
Copy Markdown

Summary

Ports the regression coverage requested on #1781 (and #1779) to the current icon-registry pipeline: asserts useGraphStyles emits a node[type="«No Type»"] entry with the default icon for vertices without a schema type — the same fallback the details panel uses.

While scoping I verified the described root cause no longer matches the code: useAllVertexStyles always appends a LABELS.MISSING_TYPE entry and useBackgroundImageMap resolves the default icon through the registry (probed green). So this PR is test-only; no behavior change. If maintainers would rather close #1779 as fixed-by-refactor, this test still locks the behavior in.

Type of change

Validation

  • New test passes; full useGraphStyles.test.tsx file green (16/16).
  • oxlint + oxfmt --check clean on the touched file.
  • Note: the test runs under jsdom, not the file's previous happy-dom — happy-dom's DOMParser/DOMPurify interop drops the <svg> root during sanitize, so svg icon resolution can never complete there; jsdom matches browser behavior (same env as useBackgroundImageMap.test.ts).

…ws#1779)

Blank nodes carry the synthetic LABELS.MISSING_TYPE, which never appears
in the schema. Asserts useGraphStyles still emits a node[type=...] entry
for it with the default icon, matching the details-panel fallback.

Runs under jsdom: happy-dom's DOMParser/DOMPurify interop drops the svg
root during sanitize, so svg icon resolution can never complete there.

Relates to aws#1779; ports the coverage asked for on aws#1781 to the current
icon-registry pipeline.

This branch has not been deployed

No deployments
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.

Blank nodes show no icon on graph canvas but display default icon in details panel

1 participant