Repository navigation
chore: Disable failing visual tests - #7728
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7728 +/- ##
=======================================
Coverage 3.29% 3.29%
=======================================
Files 561 560 -1
Lines 58576 58565 -11
Branches 873 873
=======================================
Hits 1928 1928
+ Misses 56648 56637 -11
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
The renderer seeded its mulberry32 PRNG from hashString(id) where the SVG element id varies per render, so each render produced a different wavy boundary and Argos visual tests failed on every run. Adds a `cynefin.seed` config field (default 0 → existing per-id hashing behavior; any non-zero value locks the waviness across renders). Extracts a `resolveSeed(configuredSeed, id)` helper alongside the existing PRNG primitives, hardened against non-finite inputs. The cypress helper now injects `cynefin.seed = 1` alongside the existing `handDrawnSeed = 1`, and the cynefin cypress spec (skipped in mermaid-js#7728 pending this fix) is re-enabled with one added seed-override test. Resolves mermaid-js#7727
The cytoscape-fcose layout calls Math.random() internally in its constraint solver regardless of randomize:false, so the visual test 'should render a deterministic layout for a complex deeply-nested diagram' failed on every CI run (and was disabled in mermaid-js#7728 pending this fix). Adds an `architecture.seed` config field (default 1) that temporarily swaps Math.random for a mulberry32 seeded generator around the two layout.run() invocations and restores it in a finally block. The non-zero default makes every architecture diagram render with the same layout on every render; setting `architecture.seed: 0` opts out of the swap and restores the pre-fix non-deterministic behavior for callers who want layout variety. Re-enables the previously skipped cypress test, injects `architecture.seed = 1` from the test helper alongside handDrawnSeed=1, and adds a new test that exercises an explicit seed override. Resolves mermaid-js#7729
📑 Summary
The visual test 'should render a deterministic layout for a complex deeply-nested diagram' for Architecture diagrams is disabled since it fails in CI
The visual tests for Cynefin diagrams are disabled since they fail in CI.
During work with this PR, a problem was found that handling of subset screenshots was correct. In this PR a minor fix for that is added
Note: Separate issues are be raised to fix the failing tests. See https://github.com/mermaid-js/mermaid/issues/7727 and https://github.com/mermaid-js/mermaid/issues/7729
📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSIONis used for all new features.pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.