fix: Race condition when running suppressError test.

Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
Sidharth Vinod
2023-09-16 13:33:28 +05:30
parent bd1e7a7c13
commit 56d339b8f0
2 changed files with 17 additions and 2 deletions

View File

@@ -46,7 +46,11 @@
import mermaid from './mermaid.esm.mjs';
const shouldSuppress =
new URLSearchParams(window.location.search).get('suppressErrorRendering') === 'true';
mermaid.initialize({ startOnLoad: true, suppressErrorRendering: shouldSuppress });
mermaid.initialize({ startOnLoad: false, suppressErrorRendering: shouldSuppress });
await mermaid.run();
if (window.Cypress) {
window.rendered = true;
}
</script>
</body>
</html>