Merge pull request #3063 from financelurker/feature/3062_critical_region_and_break_in_sequence_diagrams

feat: adding "Critical Region"/"Option" and "Break" blocks to sequence diagram
This commit is contained in:
Knut Sveidqvist
2022-05-31 17:11:03 +02:00
committed by GitHub
6 changed files with 260 additions and 0 deletions

View File

@@ -452,6 +452,42 @@ context('Sequence diagram', () => {
{}
);
});
it('should render rect around and inside criticals', () => {
imgSnapshotTest(
`
sequenceDiagram
A ->> B: 1
rect rgb(204, 0, 102)
critical yes
C ->> C: 1
option no
rect rgb(0, 204, 204)
C ->> C: 0
end
end
end
B ->> A: Return
`,
{}
);
});
it('should render rect around and inside breaks', () => {
imgSnapshotTest(
`
sequenceDiagram
A ->> B: 1
rect rgb(204, 0, 102)
break yes
rect rgb(0, 204, 204)
C ->> C: 0
end
end
end
B ->> A: Return
`,
{}
);
});
it('should render autonumber when configured with such', () => {
imgSnapshotTest(
`