From abd00b4516fc054cff18ea47ade87fa681c4231c Mon Sep 17 00:00:00 2001 From: Guy Pursey Date: Tue, 24 Oct 2023 21:47:37 +0100 Subject: [PATCH] GitGraph: added 2x e2e tests for branches not used immediately My focus earlier on had been on relationship to `main` branch so this is to ensure that we have some tests that cover relationship between a pair of branches that doesn't include `main`. --- .../integration/rendering/gitGraph.spec.js | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/cypress/integration/rendering/gitGraph.spec.js b/cypress/integration/rendering/gitGraph.spec.js index e232aaca2ee..4e26484b7d9 100644 --- a/cypress/integration/rendering/gitGraph.spec.js +++ b/cypress/integration/rendering/gitGraph.spec.js @@ -765,4 +765,50 @@ gitGraph TB: {} ); }); + it('38: should render GitGraph with branch and sub-branch neither of which used immediately', () => { + imgSnapshotTest( + `gitGraph LR: + commit + branch x + checkout main + commit + checkout x + commit + checkout main + merge x + checkout x + branch y + checkout x + commit + checkout y + commit + checkout x + merge y + `, + {} + ); + }); + it('39: should render GitGraph with branch and sub-branch neither of which used immediately | Vertical Branch', () => { + imgSnapshotTest( + `gitGraph TB: + commit + branch x + checkout main + commit + checkout x + commit + checkout main + merge x + checkout x + branch y + checkout x + commit + checkout y + commit + checkout x + merge y + `, + {} + ); + }); });