#1257 Adding the autonumber keyword + tests and docs

This commit is contained in:
Knut Sveidqvist
2020-02-16 15:26:08 +01:00
parent cf6f1a083e
commit f8137ea7c1
7 changed files with 111 additions and 7 deletions

View File

@@ -149,5 +149,38 @@ context('Sequence diagram', () => {
{}
);
});
it('should render autonumber when configured with such', () => {
imgSnapshotTest(
`
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
`,
{sequence: { actorMargin: 50, showSequenceNumbers: true }}
);
});
it('should render autonumber when autonumber keyword is used', () => {
imgSnapshotTest(
`
sequenceDiagram
autonumber
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
`,
{}
);
});
});
});