Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/4912 GitGraph routing and colouring for merges and cherry-picks #4927

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f42cec2
GitGraph: Add check for direction of merge arrow to determine colour.
guypursey Oct 6, 2023
d9daf19
GitGraph: Correct commit variable in overlap check.
guypursey Oct 7, 2023
839645f
GitGraph: Add more example diagrams to test with.
guypursey Oct 7, 2023
6dc8e58
GitGraph: Refactor hasOverlappingCommits function
guypursey Oct 7, 2023
33050e1
GitGraph: Update variable names in drawArrow fn
guypursey Oct 7, 2023
4787bb0
GitGraph: corrected object method in hasOverlappingCommits
guypursey Oct 11, 2023
60bb7b5
GitGraph: updated demo page to include top-to-bottom examples.
guypursey Oct 12, 2023
9469f75
GitGraph: Moved overlapping commit arrow colour inside conditional
guypursey Oct 12, 2023
69ec4a0
GitGraph: Added cherry-pick and merge demos for to GitGraph.
guypursey Oct 12, 2023
8c43d22
GitGraph: added destination branch check into overlapping fn.
guypursey Oct 12, 2023
9f8457d
GitGraph: Rewrote overlap fn to make main branch exception to rule.
guypursey Oct 12, 2023
461a293
GitGraph: refactored overlapping fn for efficiency/performance
guypursey Oct 13, 2023
902a9dd
GitGraph: added and updated demos to align with some of e2e testing
guypursey Oct 13, 2023
dba7197
GitGraph: simplified overlapping check fn
guypursey Oct 13, 2023
7c87df7
GitGraph: rename overlap check to shouldRerouteArrow
guypursey Oct 13, 2023
3ba33c8
GitGraph: added more to demos
guypursey Oct 15, 2023
3e18e76
GitGraph: removed check of branch with main from arrow reroute fn
guypursey Oct 15, 2023
25a678c
GitGraph: added e2e tests for multiple branches from one commit
guypursey Oct 15, 2023
b0b2768
GitGraph: fixed an e2e branch for vertical branch
guypursey Oct 17, 2023
2acad55
GitGraph: e2e tests, added commit IDs to test graphs
guypursey Oct 17, 2023
adfe172
GitGraph: Added e2e tests for deferred branch use.
guypursey Oct 23, 2023
0555368
GitGraph: added branch checking to rerouting
guypursey Oct 24, 2023
f7d83e2
GitGraph: added 2x e2e tests for branches not used immediately
guypursey Oct 24, 2023
31a8e04
GitGraph: corrected minor typo in comment.
guypursey Oct 26, 2023
bf52e76
GitGraph: Moved branch curve check to within reroute check fn
guypursey Oct 27, 2023
d80e1a2
GitGraph: added commit IDs to e2e test to remove false positives
guypursey Oct 27, 2023
a9c5d90
GitGraph: simplified branch check in arrow rerouting fn
guypursey Oct 27, 2023
57a9d73
GitGraph: made reroute fn more readable
guypursey Oct 27, 2023
fb031ee
Merge branch 'develop' into bug/4912_gitgraph-merge-routing-colouring
nirname Nov 13, 2023
52603d7
Merge branch 'develop' into bug/4912_gitgraph-merge-routing-colouring
nirname Nov 14, 2023
3df7cf2
Merge branch 'develop' into bug/4912_gitgraph-merge-routing-colouring
nirname Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions cypress/integration/rendering/gitGraph.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,4 +701,114 @@ gitGraph TB:
{}
);
});
it('34: should render a simple gitgraph with two branches from same commit', () => {
imgSnapshotTest(
`gitGraph
commit id:"1-abcdefg"
commit id:"2-abcdefg"
branch feature-001
commit id:"3-abcdefg"
commit id:"4-abcdefg"
checkout main
branch feature-002
commit id:"5-abcdefg"
checkout feature-001
merge feature-002
`,
{}
);
});
it('35: should render a simple gitgraph with two branches from same commit | Vertical Branch', () => {
imgSnapshotTest(
`gitGraph TB:
commit id:"1-abcdefg"
commit id:"2-abcdefg"
branch feature-001
commit id:"3-abcdefg"
commit id:"4-abcdefg"
checkout main
branch feature-002
commit id:"5-abcdefg"
checkout feature-001
merge feature-002
`,
{}
);
});
it('36: should render GitGraph with branch that is not used immediately', () => {
imgSnapshotTest(
`gitGraph LR:
commit id:"1-abcdefg"
branch x
checkout main
commit id:"2-abcdefg"
checkout x
commit id:"3-abcdefg"
checkout main
merge x
`,
{}
);
});
it('37: should render GitGraph with branch that is not used immediately | Vertical Branch', () => {
imgSnapshotTest(
`gitGraph TB:
commit id:"1-abcdefg"
branch x
checkout main
commit id:"2-abcdefg"
checkout x
commit id:"3-abcdefg"
checkout main
merge x
`,
{}
);
});
it('38: should render GitGraph with branch and sub-branch neither of which used immediately', () => {
imgSnapshotTest(
`gitGraph LR:
commit id:"1-abcdefg"
branch x
checkout main
commit id:"2-abcdefg"
checkout x
commit id:"3-abcdefg"
checkout main
merge x
checkout x
branch y
checkout x
commit id:"4-abcdefg"
checkout y
commit id:"5-abcdefg"
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 id:"1-abcdefg"
branch x
checkout main
commit id:"2-abcdefg"
checkout x
commit id:"3-abcdefg"
checkout main
merge x
checkout x
branch y
checkout x
commit id:"4-abcdefg"
checkout y
commit id:"5-abcdefg"
checkout x
merge y
`,
{}
);
});
});
Loading
Loading