Skip to content

Commit

Permalink
Wait for image to be rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Mar 23, 2024
1 parent 63e3b1a commit fa1605e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/other/configuration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ describe('Configuration', () => {
it('should not taint the initial configuration when using multiple directives', () => {
const url = 'http://localhost:9000/regression/issue-1874.html';
cy.visit(url);

cy.get('svg');
cy.window().should('have.property', 'rendered', true);
cy.get('svg').should('be.visible');
cy.matchImageSnapshot(
'configuration.spec-should-not-taint-initial-configuration-when-using-multiple-directives'
);
Expand Down
6 changes: 5 additions & 1 deletion cypress/platform/regression/issue-1874.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ <h1>Example</h1>
mermaid.initialize({
theme: 'base',
themeVariables: {},
startOnLoad: true,
startOnLoad: false,
});
await mermaid.run();
if (window.Cypress) {
window.rendered = true;
}
</script>
</html>

0 comments on commit fa1605e

Please sign in to comment.