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:
Guy Pursey 2023-10-23 10:12:28 +01:00
parent 2acad550da
commit adfe1728ae

View File

@ -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
`,
{}
);
});
});