diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html
index 91a3bbaad..ca2333cd5 100644
--- a/cypress/platform/knsv2.html
+++ b/cypress/platform/knsv2.html
@@ -100,7 +100,7 @@ mindmap
logLevel: 0,
// basePath: './packages/',
// themeVariables: { darkMode: true },
- extraDiagrams: ['./mermaid-mindmap-detector.core.mjs'],
+ extraDiagrams: ['./mermaid-mindmap-detector.esm.mjs'],
// extraDiagrams: ['../../mermaid-mindmap/registry.ts'],
});
function callback() {
diff --git a/cypress/platform/render-after-error.html b/cypress/platform/render-after-error.html
index 267ffade1..059f79345 100644
--- a/cypress/platform/render-after-error.html
+++ b/cypress/platform/render-after-error.html
@@ -14,15 +14,16 @@
mermaid.init({ startOnLoad: false });
mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
+ (async () => {
+ try {
+ console.log('rendering');
+ await mermaid.mermaidAPI.render('graphDiv', `>`);
+ } catch (e) {}
- try {
- console.log('rendering');
- mermaid.mermaidAPI.render('graphDiv', `>`);
- } catch (e) {}
-
- mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`, (html) => {
- document.getElementById('graph').innerHTML = html;
- });
+ await mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`, (html) => {
+ document.getElementById('graph').innerHTML = html;
+ });
+ })();