mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-30 21:56:43 +02:00
Wait for image to be rendered
This commit is contained in:
@@ -118,8 +118,8 @@ describe('Configuration', () => {
|
|||||||
it('should not taint the initial configuration when using multiple directives', () => {
|
it('should not taint the initial configuration when using multiple directives', () => {
|
||||||
const url = 'http://localhost:9000/regression/issue-1874.html';
|
const url = 'http://localhost:9000/regression/issue-1874.html';
|
||||||
cy.visit(url);
|
cy.visit(url);
|
||||||
|
cy.window().should('have.property', 'rendered', true);
|
||||||
cy.get('svg');
|
cy.get('svg').should('be.visible');
|
||||||
cy.matchImageSnapshot(
|
cy.matchImageSnapshot(
|
||||||
'configuration.spec-should-not-taint-initial-configuration-when-using-multiple-directives'
|
'configuration.spec-should-not-taint-initial-configuration-when-using-multiple-directives'
|
||||||
);
|
);
|
||||||
|
@@ -21,7 +21,11 @@ sequenceDiagram
|
|||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
theme: 'base',
|
theme: 'base',
|
||||||
themeVariables: {},
|
themeVariables: {},
|
||||||
startOnLoad: true,
|
startOnLoad: false,
|
||||||
});
|
});
|
||||||
|
await mermaid.run();
|
||||||
|
if (window.Cypress) {
|
||||||
|
window.rendered = true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user