From ba436cc37a55d902352c5658052d1ee41e9dc827 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 10 Oct 2022 21:57:22 +0800 Subject: [PATCH] fix: Tests --- cypress/platform/render-after-error.html | 4 ++-- cypress/platform/rerender.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/platform/render-after-error.html b/cypress/platform/render-after-error.html index 059f79345..96dcd3f8b 100644 --- a/cypress/platform/render-after-error.html +++ b/cypress/platform/render-after-error.html @@ -17,10 +17,10 @@ (async () => { try { console.log('rendering'); - await mermaid.mermaidAPI.render('graphDiv', `>`); + await mermaid.mermaidAPI.renderAsync('graphDiv', `>`); } catch (e) {} - await mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`, (html) => { + await mermaid.mermaidAPI.renderAsync('graphDiv', `graph LR\n a --> b`, (html) => { document.getElementById('graph').innerHTML = html; }); })(); diff --git a/cypress/platform/rerender.html b/cypress/platform/rerender.html index 61c6891f7..0d7588ef5 100644 --- a/cypress/platform/rerender.html +++ b/cypress/platform/rerender.html @@ -19,7 +19,7 @@ function rerender(text) { const graphText = `graph TD A[${text}] -->|Get money| B(Go shopping)`; - mermaid.mermaidAPI.render('id', graphText).then((svg) => { + mermaid.mermaidAPI.renderAsync('id', graphText).then((svg) => { console.log('\x1b[35m%s\x1b[0m', '>> graph', svg); document.getElementById('graph').innerHTML = svg; });