Wait for image to be rendered

This commit is contained in:
Sidharth Vinod 2024-03-23 15:57:29 +05:30
parent 63e3b1af52
commit fa1605e7e7
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
2 changed files with 7 additions and 3 deletions

View File

@ -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'
);

View File

@ -21,7 +21,11 @@ sequenceDiagram
mermaid.initialize({
theme: 'base',
themeVariables: {},
startOnLoad: true,
startOnLoad: false,
});
await mermaid.run();
if (window.Cypress) {
window.rendered = true;
}
</script>
</html>