mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
GitGraph: Added e2e tests for deferred branch use.
In these tests, a new branch is created but then a commit is made on the main branch before the new branch gets a commit. This important to see what happens with rerouting of arrows. Suggested by @nirname in PR review of #4927.
This commit is contained in:
parent
2acad550da
commit
adfe1728ae
@ -735,4 +735,34 @@ gitGraph TB:
|
||||
{}
|
||||
);
|
||||
});
|
||||
it('36: should render GitGraph with branch that is not used immediately', () => {
|
||||
imgSnapshotTest(
|
||||
`gitGraph LR:
|
||||
commit
|
||||
branch x
|
||||
checkout main
|
||||
commit
|
||||
checkout x
|
||||
commit
|
||||
checkout main
|
||||
merge x
|
||||
`,
|
||||
{}
|
||||
);
|
||||
});
|
||||
it('37: should render GitGraph with branch that is not used immediately | Vertical Branch', () => {
|
||||
imgSnapshotTest(
|
||||
`gitGraph TB:
|
||||
commit
|
||||
branch x
|
||||
checkout main
|
||||
commit
|
||||
checkout x
|
||||
commit
|
||||
checkout main
|
||||
merge x
|
||||
`,
|
||||
{}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user