mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-21 17:26:45 +02:00
fix(#4256): Keep error diagram on screen
This commit is contained in:
36
cypress/integration/rendering/errorDiagram.spec.js
Normal file
36
cypress/integration/rendering/errorDiagram.spec.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import { imgSnapshotTest } from '../../helpers/util';
|
||||
|
||||
describe('Error Diagrams', () => {
|
||||
it('should render a simple ER diagram', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
error
|
||||
`,
|
||||
{ logLevel: 1 }
|
||||
);
|
||||
});
|
||||
|
||||
it('should render error diagram for actual errors', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
flowchart TD
|
||||
A[Christmas] --|Get money| B(Go shopping)
|
||||
`,
|
||||
{ logLevel: 1 }
|
||||
);
|
||||
});
|
||||
|
||||
it('should render error for wrong ER diagram', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
erDiagram
|
||||
ATLAS-ORGANIZATION ||--|{ ATLAS-PROJECTS : "has many"
|
||||
ATLAS-PROJECTS ||--|{ MONGODB-CLUSTERS : "has many"
|
||||
ATLAS-PROJECTS ||--|{ ATLAS-TEAMS : "has many"
|
||||
MONGODB-CLUSTERS ||..|{
|
||||
ATLAS-TEAMS ||..|{
|
||||
`,
|
||||
{ logLevel: 1 }
|
||||
);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user