mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-30 21:56:43 +02:00
#478 API crashes on 2nd render() call
- add e2e test for (re)rendering by api
This commit is contained in:
16
cypress/integration/other/rerender.spec.js
Normal file
16
cypress/integration/other/rerender.spec.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/* eslint-env jest */
|
||||
describe('Rerendering', () => {
|
||||
|
||||
it('should be able to render and rerender a graph via API', () => {
|
||||
const url = 'http://localhost:9000/rerender.html';
|
||||
cy.viewport(1440, 1024);
|
||||
cy.visit(url);
|
||||
cy.get('#graph #A').should('have.text', 'XMas');
|
||||
|
||||
cy.get('body')
|
||||
.find('#rerender')
|
||||
.click({ force: true });
|
||||
|
||||
cy.get('#graph #A').should('have.text', 'Saturday');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user