2019-10-15 17:05:20 +02:00
|
|
|
describe('Rerendering', () => {
|
2021-11-18 19:17:00 +01:00
|
|
|
it('should be able to render after an error has occured', () => {
|
|
|
|
const url = 'http://localhost:9000/render-after-error.html';
|
|
|
|
cy.viewport(1440, 1024);
|
|
|
|
cy.visit(url);
|
|
|
|
cy.get('#graphDiv').should('exist');
|
|
|
|
});
|
2019-10-15 17:05:20 +02:00
|
|
|
|
2021-11-18 19:17:00 +01:00
|
|
|
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 [id^=flowchart-A]').should('have.text', 'XMas');
|
2019-10-15 17:05:20 +02:00
|
|
|
|
2021-11-18 19:17:00 +01:00
|
|
|
cy.get('body').find('#rerender').click({ force: true });
|
2019-10-15 17:05:20 +02:00
|
|
|
|
2021-11-18 19:17:00 +01:00
|
|
|
cy.get('#graph [id^=flowchart-A]').should('have.text', 'Saturday');
|
|
|
|
});
|
2019-10-15 17:05:20 +02:00
|
|
|
});
|