test(e2e): fix failing xss9 test

Fixes xx9 test to continue running even if JavaScript throws an
exception.
This commit is contained in:
Alois Klink 2022-09-14 02:38:13 +01:00
parent 13809b5025
commit f05c790248
1 changed files with 3 additions and 0 deletions

View File

@ -81,6 +81,9 @@ describe('XSS', () => {
cy.get('#the-malware').should('not.exist');
});
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.on('uncaught:exception', (_err, _runnable) => {
return false; // continue rendering even if there if mermaid throws an error
});
cy.visit('http://localhost:9000/xss9.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');