From 280c7e8da1e4d66c6d867fc1e378ace58c72f475 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sun, 21 Aug 2022 11:05:13 +0200 Subject: [PATCH] #3243 Adding disabled testcase for diagram with leading \n --- cypress/helpers/util.js | 4 ++-- src/diagrams/class/classDiagram.spec.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cypress/helpers/util.js b/cypress/helpers/util.js index 0a52a335b..b5e64a1e8 100644 --- a/cypress/helpers/util.js +++ b/cypress/helpers/util.js @@ -42,8 +42,8 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) => if (!options.fontSize) { options.fontSize = '16px'; } - // const useAppli = Cypress.env('useAppli'); - const useAppli = false; + const useAppli = Cypress.env('useAppli'); + //const useAppli = false; const branch = Cypress.env('codeBranch'); cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); diff --git a/src/diagrams/class/classDiagram.spec.js b/src/diagrams/class/classDiagram.spec.js index 5c09f6ff8..7d196d1a9 100644 --- a/src/diagrams/class/classDiagram.spec.js +++ b/src/diagrams/class/classDiagram.spec.js @@ -14,7 +14,16 @@ describe('class diagram, ', function () { parser.parse(str); }); + xit('should handle a leading newline axa', function () { + const str = '\nclassDiagram\n' + 'class Car'; + try { + parser.parse(str); + // Fail test if above expression doesn't throw anything. + } catch (e) { + expect(true).toBe(false); + } + }); it('should handle relation definitions', function () { const str = 'classDiagram\n' +