Merge branch '1252_gitgraph_reinvented' of github.com:mermaid-js/mermaid into 1252_gitgraph_reinvented

This commit is contained in:
Knut Sveidqvist
2022-03-17 20:07:30 +01:00
5 changed files with 328 additions and 52 deletions

View File

@@ -1,9 +1,9 @@
import { imgSnapshotTest } from '../../helpers/util.js';
describe('Git Graph diagram', () => {
it('1: should render a simple gitgraph with commit on master branch', () => {
it('1: should render a simple gitgraph with commit on main branch', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit
commit
commit
@@ -11,9 +11,9 @@ describe('Git Graph diagram', () => {
{}
);
});
it('2: should render a simple gitgraph with commit on master branch with Id', () => {
it('2: should render a simple gitgraph with commit on main branch with Id', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit id: "One"
commit id: "Two"
commit id: "Three"
@@ -21,9 +21,9 @@ describe('Git Graph diagram', () => {
{}
);
});
it('3: should render a simple gitgraph with different commitTypes on master branch ', () => {
it('3: should render a simple gitgraph with different commitTypes on main branch ', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit id: "Normal Commit"
commit id: "Reverse Commit" commitType: REVERSE
commit id: "Hightlight Commit" commitType: HIGHLIGHT
@@ -31,9 +31,9 @@ describe('Git Graph diagram', () => {
{}
);
});
it('4: should render a simple gitgraph with tags commitTypes on master branch ', () => {
it('4: should render a simple gitgraph with tags commitTypes on main branch ', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit id: "Normal Commit with tag" teg: "v1.0.0"
commit id: "Reverse Commit with tag" commitType: REVERSE tag: "RC_1"
commit id: "Hightlight Commit" commitType: HIGHLIGHT tag: "8.8.4"
@@ -43,14 +43,14 @@ describe('Git Graph diagram', () => {
});
it('5: should render a simple gitgraph with two branches', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout master
checkout main
commit
commit
`,
@@ -59,14 +59,14 @@ describe('Git Graph diagram', () => {
});
it('6: should render a simple gitgraph with two branches and merge commit', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout master
checkout main
merge develop
commit
commit
@@ -76,27 +76,27 @@ describe('Git Graph diagram', () => {
});
it('7: should render a simple gitgraph with three branches and merge commit', () => {
imgSnapshotTest(
`gitgraph
`gitGraph
commit
commit
branch nice_feature
checkout nice_feature
commit
checkout master
checkout main
commit
checkout nice_feature
branch very_nice_feature
checkout very_nice_feature
commit
checkout master
checkout main
commit
checkout nice_feature
commit
checkout master
checkout main
merge nice_feature
checkout very_nice_feature
commit
checkout master
checkout main
commit
`,
{}