mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-09 17:19:45 +02: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:
@@ -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
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user