|
|
|
|
@@ -216,8 +216,8 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
testName: "showing graph, including rebase commits",
|
|
|
|
|
commits: []*models.Commit{
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}},
|
|
|
|
|
{Name: "commit4", Sha: "sha4", Parents: []string{"sha5"}},
|
|
|
|
|
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
|
|
|
|
@@ -240,8 +240,8 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
testName: "showing graph, including rebase commits, with offset",
|
|
|
|
|
commits: []*models.Commit{
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}},
|
|
|
|
|
{Name: "commit4", Sha: "sha4", Parents: []string{"sha5"}},
|
|
|
|
|
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
|
|
|
|
@@ -263,8 +263,8 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
testName: "startIdx is past TODO commits",
|
|
|
|
|
commits: []*models.Commit{
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}},
|
|
|
|
|
{Name: "commit4", Sha: "sha4", Parents: []string{"sha5"}},
|
|
|
|
|
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
|
|
|
|
@@ -284,8 +284,8 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
testName: "only showing TODO commits",
|
|
|
|
|
commits: []*models.Commit{
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}},
|
|
|
|
|
{Name: "commit4", Sha: "sha4", Parents: []string{"sha5"}},
|
|
|
|
|
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
|
|
|
|
@@ -325,10 +325,10 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
testName: "only TODO commits except last",
|
|
|
|
|
commits: []*models.Commit{
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit4", Sha: "sha4", Parents: []string{"sha5"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2", "sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit4", Sha: "sha4", Parents: []string{"sha5"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
|
|
|
|
},
|
|
|
|
|
startIdx: 0,
|
|
|
|
|
@@ -346,7 +346,7 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
testName: "don't show YOU ARE HERE label when not asked for (e.g. in branches panel)",
|
|
|
|
|
commits: []*models.Commit{
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2"}, Action: todo.Pick},
|
|
|
|
|
{Name: "commit1", Sha: "sha1", Parents: []string{"sha2"}, Action: todo.Pick, Status: models.StatusRebasing},
|
|
|
|
|
{Name: "commit2", Sha: "sha2", Parents: []string{"sha3"}},
|
|
|
|
|
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}},
|
|
|
|
|
},
|
|
|
|
|
|