From 0dc6e0a0d9a254c53199eb3bbfc95246af78d8ae Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Mon, 20 Mar 2023 12:21:22 +0100 Subject: [PATCH] Update cypress mermaid imports --- cypress/platform/ashish2.html | 2 +- cypress/platform/bundle-test.js | 3 ++- cypress/platform/external-diagrams-example-diagram.html | 2 +- cypress/platform/flow2.html | 2 +- cypress/platform/knsv2.html | 2 +- cypress/platform/viewer.js | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cypress/platform/ashish2.html b/cypress/platform/ashish2.html index 93a47c18a..76fbd36f7 100644 --- a/cypress/platform/ashish2.html +++ b/cypress/platform/ashish2.html @@ -188,7 +188,7 @@ mindmap //import mindmap from '../../packages/mermaid-mindmap/src/detector'; // import example from '../../packages/mermaid-example-diagram/src/detector'; // import timeline from '../../packages/mermaid-timeline/src/detector'; - import mermaid from '../../packages/mermaid/dist/mermaid.esm.mjs'; + import mermaid from './mermaid.esm.mjs'; // await mermaid.registerExternalDiagrams([]); mermaid.parseError = function (err, hash) { // console.error('Mermaid error: ', err); diff --git a/cypress/platform/bundle-test.js b/cypress/platform/bundle-test.js index b97d7134f..f5bf0ecd6 100644 --- a/cypress/platform/bundle-test.js +++ b/cypress/platform/bundle-test.js @@ -1,4 +1,5 @@ -import mermaid from '../../packages/mermaid/dist/mermaid.esm.mjs'; +// TODO: this file should be testing the ./mermaid.core.mjs file, as that's the file listed in the package.json file that users will use +import mermaid from './mermaid.esm.mjs'; let code = `flowchart LR Power_Supply --> Transmitter_A diff --git a/cypress/platform/external-diagrams-example-diagram.html b/cypress/platform/external-diagrams-example-diagram.html index 80d707d88..495b7e59d 100644 --- a/cypress/platform/external-diagrams-example-diagram.html +++ b/cypress/platform/external-diagrams-example-diagram.html @@ -13,7 +13,7 @@ example-diagram