diff --git a/cypress/integration/rendering/classDiagram-v2.spec.js b/cypress/integration/rendering/classDiagram-v2.spec.js index 05f7545e8..66fd1c51f 100644 --- a/cypress/integration/rendering/classDiagram-v2.spec.js +++ b/cypress/integration/rendering/classDiagram-v2.spec.js @@ -370,4 +370,100 @@ describe('Class diagram V2', () => { ); cy.get('svg'); }); + it('16: should handle the direction statemment with TB', () => { + imgSnapshotTest( + ` + classDiagram + direction TB + class Student { + -idCard : IdCard + } + class IdCard{ + -id : int + -name : string + } + class Bike{ + -id : int + -name : string + } + Student "1" --o "1" IdCard : carries + Student "1" --o "1" Bike : rides + + `, + {logLevel : 1, flowchart: { "htmlLabels": false },} + ); + cy.get('svg'); + }); + it('17: should handle the direction statemment with BT', () => { + imgSnapshotTest( + ` + classDiagram + direction BT + class Student { + -idCard : IdCard + } + class IdCard{ + -id : int + -name : string + } + class Bike{ + -id : int + -name : string + } + Student "1" --o "1" IdCard : carries + Student "1" --o "1" Bike : rides + + `, + {logLevel : 1, flowchart: { "htmlLabels": false },} + ); + cy.get('svg'); + }); + it('17: should handle the direction statemment with RL', () => { + imgSnapshotTest( + ` + classDiagram + direction RL + class Student { + -idCard : IdCard + } + class IdCard{ + -id : int + -name : string + } + class Bike{ + -id : int + -name : string + } + Student "1" --o "1" IdCard : carries + Student "1" --o "1" Bike : rides + + `, + {logLevel : 1, flowchart: { "htmlLabels": false },} + ); + cy.get('svg'); + }); + it('18: should handle the direction statemment with LR', () => { + imgSnapshotTest( + ` + classDiagram + direction LR + class Student { + -idCard : IdCard + } + class IdCard{ + -id : int + -name : string + } + class Bike{ + -id : int + -name : string + } + Student "1" --o "1" IdCard : carries + Student "1" --o "1" Bike : rides + + `, + {logLevel : 1, flowchart: { "htmlLabels": false },} + ); + cy.get('svg'); + }); }); diff --git a/cypress/platform/knsv.html b/cypress/platform/knsv.html index 474132392..3968e0055 100644 --- a/cypress/platform/knsv.html +++ b/cypress/platform/knsv.html @@ -10,7 +10,7 @@