Skip to content

Commit 54d485f

Browse files
authored
Merge branch 'develop' into patch-1
2 parents 8cb1c68 + bff3282 commit 54d485f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+740
-204
lines changed

.changeset/angry-bags-brake.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: architecture diagrams no longer grow to extreme heights due to conflicting alignments

.changeset/chilly-hotels-mix.md

-5
This file was deleted.

.changeset/dry-students-act.md

-5
This file was deleted.

.changeset/heavy-cats-mate.md

-5
This file was deleted.

.changeset/kind-drinks-invent.md

-5
This file was deleted.

.changeset/thick-elephants-search.md

-5
This file was deleted.

cypress/integration/rendering/architecture.spec.ts

+52
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,58 @@ describe.skip('architecture diagram', () => {
171171
`
172172
);
173173
});
174+
175+
it('should render an architecture diagram with a resonable height', () => {
176+
imgSnapshotTest(
177+
`architecture-beta
178+
group federated(cloud)[Federated Environment]
179+
service server1(server)[System] in federated
180+
service edge(server)[Edge Device] in federated
181+
server1:R -- L:edge
182+
183+
group on_prem(cloud)[Hub]
184+
service firewall(server)[Firewall Device] in on_prem
185+
service server(server)[Server] in on_prem
186+
firewall:R -- L:server
187+
188+
service db1(database)[db1] in on_prem
189+
service db2(database)[db2] in on_prem
190+
service db3(database)[db3] in on_prem
191+
service db4(database)[db4] in on_prem
192+
service db5(database)[db5] in on_prem
193+
service db6(database)[db6] in on_prem
194+
195+
junction mid in on_prem
196+
server:B -- T:mid
197+
198+
junction 1Leftofmid in on_prem
199+
1Leftofmid:R -- L:mid
200+
1Leftofmid:B -- T:db1
201+
202+
junction 2Leftofmid in on_prem
203+
2Leftofmid:R -- L:1Leftofmid
204+
2Leftofmid:B -- T:db2
205+
206+
junction 3Leftofmid in on_prem
207+
3Leftofmid:R -- L:2Leftofmid
208+
3Leftofmid:B -- T:db3
209+
210+
junction 1RightOfMid in on_prem
211+
mid:R -- L:1RightOfMid
212+
1RightOfMid:B -- T:db4
213+
214+
junction 2RightOfMid in on_prem
215+
1RightOfMid:R -- L:2RightOfMid
216+
2RightOfMid:B -- T:db5
217+
218+
junction 3RightOfMid in on_prem
219+
2RightOfMid:R -- L:3RightOfMid
220+
3RightOfMid:B -- T:db6
221+
222+
edge:R -- L:firewall
223+
`
224+
);
225+
});
174226
});
175227

176228
// Skipped as the layout is not deterministic, and causes issues in E2E tests.

cypress/integration/rendering/flowchart-elk.spec.js

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
22

3-
describe.skip('Flowchart ELK', () => {
3+
describe('Flowchart ELK', () => {
44
it('1-elk: should render a simple flowchart', () => {
55
imgSnapshotTest(
66
`flowchart-elk TD
@@ -857,6 +857,49 @@ flowchart LR
857857
D --> E
858858
A["A"]
859859
860+
`,
861+
{ flowchart: { titleTopMargin: 0 } }
862+
);
863+
});
864+
it('6080: should handle diamond shape intersections', () => {
865+
imgSnapshotTest(
866+
`---
867+
config:
868+
layout: elk
869+
---
870+
flowchart LR
871+
subgraph s1["Untitled subgraph"]
872+
n1["Evaluate"]
873+
n2["Option 1"]
874+
n3["Option 2"]
875+
n4["fa:fa-car Option 3"]
876+
end
877+
subgraph s2["Untitled subgraph"]
878+
n5["Evaluate"]
879+
n6["Option 1"]
880+
n7["Option 2"]
881+
n8["fa:fa-car Option 3"]
882+
end
883+
A["Start"] -- Some text --> B("Continue")
884+
B --> C{"Evaluate"}
885+
C -- One --> D["Option 1"]
886+
C -- Two --> E["Option 2"]
887+
C -- Three --> F["fa:fa-car Option 3"]
888+
n1 -- One --> n2
889+
n1 -- Two --> n3
890+
n1 -- Three --> n4
891+
n5 -- One --> n6
892+
n5 -- Two --> n7
893+
n5 -- Three --> n8
894+
n1@{ shape: diam}
895+
n2@{ shape: rect}
896+
n3@{ shape: rect}
897+
n4@{ shape: rect}
898+
n5@{ shape: diam}
899+
n6@{ shape: rect}
900+
n7@{ shape: rect}
901+
n8@{ shape: rect}
902+
860903
`,
861904
{ flowchart: { titleTopMargin: 0 } }
862905
);

0 commit comments

Comments
 (0)