fix: added an e2e test case for classdiagram with anchor tag

This commit is contained in:
Harshit Anand
2023-10-26 14:55:04 +05:30
parent 06d2ba8398
commit 54ab3fc3b2

View File

@@ -501,4 +501,16 @@ describe('Class diagram', () => {
B : -methods()
`);
});
it('should handle notes with anchor tag having target attribute', () => {
renderGraph(
`classDiagram
class test { }
note for test "<a href='https://mermaid.js.org/' target="_blank"><code>note about mermaid</code></a>"`
);
cy.get('svg').then((svg) => {
cy.get('a').should('have.attr', 'target', '_blank').should('have.attr', 'rel', 'noopener');
});
});
});