mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-12 02:29:37 +02:00
feat(:accessibility): Add accessibility fields to class chart
This commit is contained in:
@@ -543,6 +543,21 @@ foo()
|
||||
expect(relations[0].relation.lineType).toBe(classDb.lineType.LINE);
|
||||
});
|
||||
|
||||
it('should have a title and accDescription', function () {
|
||||
const str =
|
||||
'classDiagram\n' +
|
||||
'class Car~T~\n' +
|
||||
'title My Title\n' +
|
||||
'accDescription My Description\n';
|
||||
'Car : -List~Wheel~ wheels\n' +
|
||||
'Car : +setWheels(List~Wheel~ wheels)\n' +
|
||||
'Car : +getWheels() List~Wheel~';
|
||||
|
||||
parser.parse(str);
|
||||
expect(parser.yy.getTitle()).toBe('My Title');
|
||||
expect(parser.yy.getAccDescription()).toBe('My Description');
|
||||
});
|
||||
|
||||
it('should handle relation definitions AGGREGATION and dotted line', function () {
|
||||
const str = 'classDiagram\n' + 'Class01 o.. Class02';
|
||||
|
||||
|
Reference in New Issue
Block a user