mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
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.
This commit is contained in:
@@ -1,75 +1 @@
|
|||||||
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
|
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');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
@@ -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 */
|
/* The end */
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user