mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Revert "Refactor integration tests"
This reverts commit 80add648e6d82eb99508b7ffa2acbf52200905c9.
This commit is contained in:
parent
d6c88ab589
commit
b5bcc3b992
@ -1,7 +1,7 @@
|
|||||||
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
|
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
|
||||||
|
|
||||||
describe('Class diagram', () => {
|
describe('Class diagram', () => {
|
||||||
it('should render a simple class diagram', () => {
|
it('1: should render a simple class diagram', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -35,7 +35,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagrams with cardinality', () => {
|
it('2: should render a simple class diagrams with cardinality', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -64,7 +64,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with different visibilities', () => {
|
it('3: should render a simple class diagram with different visibilities', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -82,7 +82,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with comments', () => {
|
it('4: should render a simple class diagram with comments', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -112,7 +112,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with abstract method', () => {
|
it('5: should render a simple class diagram with abstract method', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -124,7 +124,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with static method', () => {
|
it('6: should render a simple class diagram with static method', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -136,7 +136,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with Generic class', () => {
|
it('7: should render a simple class diagram with Generic class', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -156,7 +156,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with Generic class and relations', () => {
|
it('8: should render a simple class diagram with Generic class and relations', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -177,7 +177,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with clickable link', () => {
|
it('9: should render a simple class diagram with clickable link', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -199,7 +199,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with clickable callback', () => {
|
it('10: should render a simple class diagram with clickable callback', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -221,7 +221,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with return type on method', () => {
|
it('11: should render a simple class diagram with return type on method', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -236,7 +236,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with generic types', () => {
|
it('12: should render a simple class diagram with generic types', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -252,7 +252,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with css classes applied', () => {
|
it('13: should render a simple class diagram with css classes applied', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -270,7 +270,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with css classes applied directly', () => {
|
it('14: should render a simple class diagram with css classes applied directly', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -286,7 +286,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render a simple class diagram with css classes applied to multiple classes', () => {
|
it('15: should render a simple class diagram with css classes applied to multiple classes', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -301,7 +301,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render multiple class diagrams', () => {
|
it('16: should render multiple class diagrams', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
[
|
[
|
||||||
`
|
`
|
||||||
@ -354,7 +354,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('should render a class diagram when useMaxWidth is true (default)', () => {
|
// it('17: should render a class diagram when useMaxWidth is true (default)', () => {
|
||||||
// renderGraph(
|
// renderGraph(
|
||||||
// `
|
// `
|
||||||
// classDiagram
|
// classDiagram
|
||||||
@ -382,7 +382,7 @@ describe('Class diagram', () => {
|
|||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// it('should render a class diagram when useMaxWidth is false', () => {
|
// it('18: should render a class diagram when useMaxWidth is false', () => {
|
||||||
// renderGraph(
|
// renderGraph(
|
||||||
// `
|
// `
|
||||||
// classDiagram
|
// classDiagram
|
||||||
@ -408,7 +408,7 @@ describe('Class diagram', () => {
|
|||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
|
|
||||||
it('should render a simple class diagram with notes', () => {
|
it('19: should render a simple class diagram with notes', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
classDiagram
|
classDiagram
|
||||||
@ -424,7 +424,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render class diagram with newlines in title', () => {
|
it('20: should render class diagram with newlines in title', () => {
|
||||||
imgSnapshotTest(`
|
imgSnapshotTest(`
|
||||||
classDiagram
|
classDiagram
|
||||||
Animal <|-- \`Du\nck\`
|
Animal <|-- \`Du\nck\`
|
||||||
@ -442,7 +442,7 @@ describe('Class diagram', () => {
|
|||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render class diagram with many newlines in title', () => {
|
it('21: should render class diagram with many newlines in title', () => {
|
||||||
imgSnapshotTest(`
|
imgSnapshotTest(`
|
||||||
classDiagram
|
classDiagram
|
||||||
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
||||||
@ -456,7 +456,7 @@ describe('Class diagram', () => {
|
|||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render with newlines in title and an annotation', () => {
|
it('22: should render with newlines in title and an annotation', () => {
|
||||||
imgSnapshotTest(`
|
imgSnapshotTest(`
|
||||||
classDiagram
|
classDiagram
|
||||||
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
class \`This\nTitle\nHas\nMany\nNewlines\` {
|
||||||
@ -467,11 +467,11 @@ describe('Class diagram', () => {
|
|||||||
-Many()
|
-Many()
|
||||||
#Methods()
|
#Methods()
|
||||||
}
|
}
|
||||||
<<Interface>> \`This\nTitle\nHas\nMany\nNewlines\`
|
<<Interface>> \`This\nTitle\nHas\nMany\nNewlines\`
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle newline title in namespace', () => {
|
it('23: should handle newline title in namespace', () => {
|
||||||
imgSnapshotTest(`
|
imgSnapshotTest(`
|
||||||
classDiagram
|
classDiagram
|
||||||
namespace testingNamespace {
|
namespace testingNamespace {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user