fix: Cypress test for Suppress Error

This commit is contained in:
Sidharth Vinod
2023-09-16 13:54:43 +05:30
parent 56d339b8f0
commit 577f0ca562
2 changed files with 25 additions and 12 deletions

View File

@@ -47,9 +47,12 @@
const shouldSuppress =
new URLSearchParams(window.location.search).get('suppressErrorRendering') === 'true';
mermaid.initialize({ startOnLoad: false, suppressErrorRendering: shouldSuppress });
await mermaid.run();
if (window.Cypress) {
window.rendered = true;
try {
await mermaid.run();
} catch {
if (window.Cypress) {
window.rendered = true;
}
}
</script>
</body>