From d320e788c7ecdb1873cb65ee0fa2430a913d2054 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 16 Jan 2023 13:18:16 +0530 Subject: [PATCH] fix tests --- cypress/platform/external-diagrams-mindmap.html | 3 +++ cypress/platform/ghsa1.html | 3 +++ cypress/platform/ghsa2.html | 3 +++ cypress/platform/ghsa3.html | 3 +++ 4 files changed, 12 insertions(+) diff --git a/cypress/platform/external-diagrams-mindmap.html b/cypress/platform/external-diagrams-mindmap.html index e5eded4ba..e445a7627 100644 --- a/cypress/platform/external-diagrams-mindmap.html +++ b/cypress/platform/external-diagrams-mindmap.html @@ -44,6 +44,9 @@ mindmap await mermaid.registerExternalDiagrams([mindmap]); await mermaid.initialize({ logLevel: 0 }); await mermaid.initThrowsErrorsAsync(); + if (window.Cypress) { + window.rendered = true; + } diff --git a/cypress/platform/ghsa1.html b/cypress/platform/ghsa1.html index 890a8e0dd..59c316eb3 100644 --- a/cypress/platform/ghsa1.html +++ b/cypress/platform/ghsa1.html @@ -21,6 +21,9 @@ const diagram = document.getElementById('diagram'); const svg = mermaid.render('diagram-svg', graph); diagram.innerHTML = svg; + if (window.Cypress) { + window.rendered = true; + } diff --git a/cypress/platform/ghsa2.html b/cypress/platform/ghsa2.html index 6d4dccca3..3ff69158b 100644 --- a/cypress/platform/ghsa2.html +++ b/cypress/platform/ghsa2.html @@ -21,6 +21,9 @@ const diagram = document.getElementById('diagram'); const svg = mermaid.render('diagram-svg', graph); diagram.innerHTML = svg; + if (window.Cypress) { + window.rendered = true; + } diff --git a/cypress/platform/ghsa3.html b/cypress/platform/ghsa3.html index 63dfa0d01..79fa40131 100644 --- a/cypress/platform/ghsa3.html +++ b/cypress/platform/ghsa3.html @@ -94,6 +94,9 @@ // document.querySelector('#diagram').innerHTML = diagram; mermaid.render('diagram', diagram, (res) => { document.querySelector('#res').innerHTML = res; + if (window.Cypress) { + window.rendered = true; + } });