From b9dcdb00a55a1eeebba430613982129c28940573 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Fri, 18 Nov 2022 17:44:59 +0000 Subject: [PATCH] test(e2e): move mindmap tests to mindmap.spec.js Currently, we have mindmap tests in the cypress/integration/rendering/mermaid.spec.js which is a bit odd. They should probably all be in the mindmap.spec.js file. --- cypress/integration/rendering/mermaid.spec.js | 74 ------------------- cypress/integration/rendering/mindmap.spec.js | 72 +++++++++++++++++- 2 files changed, 71 insertions(+), 75 deletions(-) diff --git a/cypress/integration/rendering/mermaid.spec.js b/cypress/integration/rendering/mermaid.spec.js index 4b7de3027..c75c59017 100644 --- a/cypress/integration/rendering/mermaid.spec.js +++ b/cypress/integration/rendering/mermaid.spec.js @@ -1,75 +1 @@ import { imgSnapshotTest, renderGraph } from '../../helpers/util.js'; - -describe('Mindmap', () => { - it('square shape', () => { - imgSnapshotTest( - ` -mindmap - root[ - The root - ] - `, - {} - ); - cy.get('svg'); - }); - it('rounded rect shape', () => { - imgSnapshotTest( - ` -mindmap - root(( - The root - )) - `, - {} - ); - cy.get('svg'); - }); - it('circle shape', () => { - imgSnapshotTest( - ` -mindmap - root( - The root - ) - `, - {} - ); - cy.get('svg'); - }); - it('default shape', () => { - imgSnapshotTest( - ` -mindmap - The root - `, - {} - ); - cy.get('svg'); - }); - it('adding children', () => { - imgSnapshotTest( - ` -mindmap - The root - child1 - child2 - `, - {} - ); - cy.get('svg'); - }); - it('adding grand children', () => { - imgSnapshotTest( - ` -mindmap - The root - child1 - child2 - child3 - `, - {} - ); - cy.get('svg'); - }); -}); diff --git a/cypress/integration/rendering/mindmap.spec.js b/cypress/integration/rendering/mindmap.spec.js index f0cc2bc3f..61179b238 100644 --- a/cypress/integration/rendering/mindmap.spec.js +++ b/cypress/integration/rendering/mindmap.spec.js @@ -110,6 +110,76 @@ root {} ); }); - + it('square shape', () => { + imgSnapshotTest( + ` +mindmap + root[ + The root + ] + `, + {} + ); + cy.get('svg'); + }); + it('rounded rect shape', () => { + imgSnapshotTest( + ` +mindmap + root(( + The root + )) + `, + {} + ); + cy.get('svg'); + }); + it('circle shape', () => { + imgSnapshotTest( + ` +mindmap + root( + The root + ) + `, + {} + ); + cy.get('svg'); + }); + it('default shape', () => { + imgSnapshotTest( + ` +mindmap + The root + `, + {} + ); + cy.get('svg'); + }); + it('adding children', () => { + imgSnapshotTest( + ` +mindmap + The root + child1 + child2 + `, + {} + ); + cy.get('svg'); + }); + it('adding grand children', () => { + imgSnapshotTest( + ` +mindmap + The root + child1 + child2 + child3 + `, + {} + ); + cy.get('svg'); + }); /* The end */ });