mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
add journey tests for accDescription
This commit is contained in:
parent
81b982ac20
commit
6b4eaa185e
@ -36,6 +36,7 @@ describe('when using the journeyDb', function () {
|
||||
fn | expected
|
||||
${'getTasks'} | ${[]}
|
||||
${'getTitle'} | ${''}
|
||||
${'getAccDescription'} | ${''}
|
||||
${'getSections'} | ${[]}
|
||||
`('should clear $fn', ({ fn, expected }) => {
|
||||
expect(journeyDb[fn]()).toEqual(expected);
|
||||
@ -44,6 +45,7 @@ describe('when using the journeyDb', function () {
|
||||
|
||||
describe('tasks and actors should be added', function () {
|
||||
journeyDb.setTitle('Shopping');
|
||||
journeyDb.setAccDescription('A user journey for family shopping');
|
||||
journeyDb.addSection('Journey to the shops');
|
||||
journeyDb.addTask('Get car keys', ':5:Dad');
|
||||
journeyDb.addTask('Go to car', ':3:Dad, Mum, Child#1, Child#2');
|
||||
@ -52,6 +54,7 @@ describe('when using the journeyDb', function () {
|
||||
journeyDb.addTask('Go shopping', ':5:Mum');
|
||||
|
||||
expect(journeyDb.getTitle()).toEqual('Shopping');
|
||||
expect(journeyDb.getAccDescription()).toEqual('A user journey for family shopping');
|
||||
expect(journeyDb.getTasks()).toEqual([
|
||||
{
|
||||
score: 5,
|
||||
|
@ -19,6 +19,16 @@ describe('when parsing a journey diagram it', function () {
|
||||
expect(parserFnConstructor(str)).not.toThrow();
|
||||
});
|
||||
|
||||
it('it should handle an accDescription', function () {
|
||||
const str =
|
||||
'journey\n' +
|
||||
'accDescription A user journey for family shopping\n'+
|
||||
'title Adding journey diagram functionality to mermaid\n' +
|
||||
'section Order from website';
|
||||
|
||||
expect(parserFnConstructor(str)).not.toThrow();
|
||||
});
|
||||
|
||||
it('should handle a section definition', function () {
|
||||
const str =
|
||||
'journey\n' +
|
||||
|
Loading…
x
Reference in New Issue
Block a user