mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-03 20:34:20 +01:00 
			
		
		
		
	test(e2e): fix failing xss9 test
Fixes xx9 test to continue running even if JavaScript throws an exception.
This commit is contained in:
		@@ -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');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user