| 1 | describe('Rerendering', () => { |
| 2 | it('should be able to render after an error has occurred', () => { |
| 3 | const url = '/render-after-error.html'; |
| 4 | cy.visit(url); |
| 5 | cy.get('#graphDiv').should('exist'); |
| 6 | }); |
| 7 | |
| 8 | it('should be able to render and rerender a graph via API', () => { |
| 9 | const url = '/rerender.html'; |
| 10 | cy.visit(url); |
| 11 | cy.get('#graph [id^=flowchart-A]').should('have.text', 'XMas'); |
| 12 | |
| 13 | cy.get('body').find('#rerender').click({ force: true }); |
| 14 | |
| 15 | cy.get('#graph [id^=flowchart-A]').should('have.text', 'Saturday'); |
| 16 | }); |
| 17 | }); |
| 18 | |