d50c58b4c6
Implement "edit commit" in terms of the new EditRebase function
2023-04-29 07:28:33 +02:00
08a445eb9d
test: check focus on commits after performing an advanced rebase
2023-04-15 11:01:55 +02:00
8f1f712841
use lowercase text for menu items (as we're still yet to standardise on 'Sentence case')
2023-04-15 17:29:31 +10:00
b82b6a2992
test: add integration test to verify the interactive rebase correctly work
2023-04-15 17:26:08 +10:00
120dd1530a
Make EditRebaseTodo more robust
...
It used to work on the assumption that rebasing commits in lazygit's model
correspond one-to-one to lines in the git-rebase-todo file, which isn't
necessarily true (e.g. when users use "git rebase --edit-todo" at the custom
command prompt and add a "break" between lines).
2023-04-15 08:36:03 +02:00
860a8d102b
Add integration test for dropping a todo commit when there's an update-ref
...
The test shows how we are accidentally dropping the wrong commit in this case.
We'll fix that in the next commit.
2023-04-15 08:36:03 +02:00
d508badd62
Better error message when trying to amend a commit other than head during rebase
2023-04-01 08:16:15 +02:00
e7d0116312
Allow amending the head commit during interactive rebase
2023-04-01 08:16:15 +02:00
c757063264
Better error message when trying to edit or move a non-todo commit during rebase
...
Previously we would have tried to do the rebase, resulting in a long and
somewhat cryptic error message from git; now we check ourselves and show a less
intimidating message.
2023-04-01 08:16:15 +02:00
b24955063c
Allow rewording the head commit during interactive rebase
2023-04-01 08:16:15 +02:00
161bb684fa
Make integration test more robust
...
If you ran this test enough times it would eventually fail; this happened
whenever the resulting squashed commit had a sha that happened to start with
"02". We test that "commit 02" does not appear in the diff window, but in that
case it did, at the very top of the window.
A better fix might be to change the commit message that we use in CreateNCommits
to something other than "commit XY", but that would require touching tons of
tests, so this is the easier fix.
2023-02-27 08:53:06 +01:00
f7e8b2dd71
cleanup integration test code
2023-02-26 12:54:13 +11:00
1034962c7e
migrate more tests
2023-02-22 22:29:01 +11:00
78f3a7a478
migrate interactive rebase integration tests
2023-02-22 19:36:31 +11:00
c5cd217a65
Allow squashing fixups above the first commit of a repo
...
This includes amending changes into a given commit, since that's implemented in
terms of the former.
2023-02-20 08:29:43 +01:00
7351907474
Add integration tests for rebasing to the initial commit
2023-02-20 07:40:05 +01:00
dd61c49a15
Better error message for trying to squash or fixup the first commit
...
It's not so much the total number of commits that matters here, it's just
whether we are on the first one. (This includes the other condition.)
This allows us to get rid of the condition in rebase.go.
2023-02-20 07:40:04 +01:00
9fef4447b6
move popup assertions into a struct
2022-12-28 11:00:22 +11:00
7aa843c75a
create actions struct
2022-12-28 10:54:38 +11:00
ed93e0a2b0
remove dependency on model
2022-12-27 22:52:20 +11:00
c5050ecabd
move shell into test driver
2022-12-27 21:47:37 +11:00
78b495f50a
rename input to t
2022-12-27 21:35:36 +11:00
53e06b71ae
add tap function
2022-12-27 21:26:18 +11:00
b166b8f776
combine assert and input structs, clean up interface
2022-12-27 21:26:18 +11:00
09e80e5f2a
better namespacing for assertions
2022-12-27 21:26:18 +11:00
be30cbb375
add view asserter getter struct
2022-12-27 21:26:18 +11:00
8052ac4fd6
add prompt asserter
2022-12-27 21:26:18 +11:00
c976839a63
refactor prompt handling in integration tests
2022-12-27 21:26:17 +11:00
c841ba8237
add switch-to-view methods
2022-12-26 16:49:54 +11:00
9a6f21ce42
cleaner test assertions
2022-12-26 12:20:13 +11:00
fa0414777f
rename SelectedLine to CurrentLine in tests
2022-12-26 10:42:19 +11:00
b623ecf898
add helper functions for popups in tests
2022-12-24 19:15:59 +11:00
aedfce2845
refactor to not have Match at the start of assert method names, because it reads better that way
2022-12-24 19:14:52 +11:00
23d39c79b2
update test
2022-09-24 23:37:17 +02:00
0141bbde0e
Add test for amending a merge commit
2022-09-24 23:37:17 +02:00
53979f7cec
a more complex custom command test
2022-08-14 20:49:20 +10:00
b8d9443999
rename helpers to components
2022-08-13 13:55:17 +10:00
610eddfe05
fix CI
2022-08-13 13:55:09 +10:00
a45b22e12f
re-name Input and improve documentation
2022-08-13 13:55:08 +10:00
ba96baee32
move code from main into app package to allow test to be injected
2022-08-13 13:55:08 +10:00