chore:add e2e test

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
darshanr0107
2025-11-07 11:46:41 +05:30
parent 96a766dcdb
commit 9585ee7533
2 changed files with 23 additions and 3 deletions

View File

@@ -97,10 +97,18 @@ export const openURLAndVerifyRendering = (
cy.visit(url);
cy.window().should('have.property', 'rendered', true);
cy.get('svg').should('be.visible');
if (validation) {
cy.get('svg').should(validation);
// Handle sandbox mode where SVG is inside an iframe
if (options.securityLevel === 'sandbox') {
cy.get('iframe').should('be.visible');
if (validation) {
cy.get('iframe').should(validation);
}
} else {
cy.get('svg').should('be.visible');
if (validation) {
cy.get('svg').should(validation);
}
}
verifyScreenshot(name);