Commit Graph
143 Commits
Author SHA1 Message Date
Stefan Haller 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
Jesse Duffield 45d45d2397 show file tree by default in integration tests 2023-02-26 13:01:51 +11:00
Jesse Duffield f7e8b2dd71 cleanup integration test code 2023-02-26 12:54:13 +11:00
Jesse Duffield ff3c5d331e migrate merge conflict tests 2023-02-26 11:22:24 +11:00
Jesse Duffield dd1bf629b8 migrate patch building tests 2023-02-25 21:37:16 +11:00
Jesse Duffield db011d8e34 Improve staging panel integration tests 2023-02-25 11:35:41 +11:00
Jesse Duffield c63fed2074 migrate staging tests 2023-02-23 22:29:40 +11:00
Jesse Duffield 1034962c7e migrate more tests 2023-02-22 22:29:01 +11:00
Jesse Duffield eabe7f462a migrate more tests 2023-02-22 21:57:32 +11:00
Jesse Duffield 22c10479d5 migrate reflog integration tests 2023-02-22 21:15:03 +11:00
Jesse Duffield 78f3a7a478 migrate interactive rebase integration tests 2023-02-22 19:36:31 +11:00
Jesse DuffieldandGitHub 526c9dea9b Merge pull request #2293 from jesseduffield/feature/make-discarding-harder 2023-02-21 22:03:25 +11:00
Jesse Duffield bfde06d049 migrate push tests 2023-02-21 21:50:03 +11:00
Jesse Duffield 2b6a109e38 migrate stash tests 2023-02-20 21:52:27 +11:00
Jesse Duffield 71a30155dc rerun test generator 2023-02-20 19:29:15 +11:00
Jesse Duffield 6ee20840b2 migrate switch tab from menu test 2023-02-20 19:28:52 +11:00
Jesse DuffieldandGitHub e1c376ef54 Merge pull request #2453 from stefanhaller/allow-rebasing-to-first-commit 2023-02-20 19:21:37 +11:00
Jesse Duffield 0b55eaca1d add create tag from commit test 2023-02-20 19:01:08 +11:00
Jesse Duffield ee8c31880c add reset to tag test 2023-02-20 19:01:08 +11:00
Jesse Duffield daf8176dd7 add tag checkout test 2023-02-20 19:01:08 +11:00
Jesse Duffield 082d342bf8 add tag tests 2023-02-20 19:01:08 +11:00
Stefan Haller 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
Jesse Duffield 9e2a3a87dd improved commit test 2023-02-20 18:20:23 +11:00
Jesse Duffield ac580ae6a0 migrate undo2 2023-02-20 18:20:23 +11:00
Jesse DuffieldandGitHub 4b49bd406f Update pkg/integration/tests/branch/create_tag.go 2023-02-20 17:58:08 +11:00
Stefan Haller 7351907474 Add integration tests for rebasing to the initial commit 2023-02-20 07:40:05 +01:00
Stefan Haller 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
Ryooooooga 36c2b00336 test: add an integration test for creating tag on branches 2023-02-19 23:35:38 +09:00
Jesse Duffield 65bd0ab431 migrate undo test 2023-02-19 15:48:09 +11:00
Jesse Duffield 93b9e1bd19 migrate merge conflict undo test 2023-02-19 15:48:09 +11:00
Jesse Duffield b5e325b0a4 migrate revert merge test 2023-02-19 15:48:09 +11:00
Jesse Duffield 88c76868ba migrate initial open test 2023-02-19 15:48:09 +11:00
Jesse Duffield 13ee0f0a5d migrate open to branches with cli arg test 2023-02-19 15:48:09 +11:00
Jesse Duffield 76a1b501f2 migrate more force push tests 2023-02-19 15:48:09 +11:00
Jesse Duffield 7201a91b69 remove unneeded config setting 2023-02-19 13:51:37 +11:00
Jesse Duffield 31d796ee75 migrate forcePush integration test 2023-02-19 13:38:15 +11:00
Jesse Duffield a3096e720c migrate pullAndSetUpstream test 2023-02-19 12:42:48 +11:00
Jesse Duffield c599aaed51 migrate pull integration test 2023-02-19 11:48:21 +11:00
Jesse Duffield f999bbce7c add code generator for creating tests list 2023-02-19 11:48:09 +11:00
Jesse Duffield bff076c70a rename key to Pull 2023-02-19 11:42:00 +11:00
stk b499eba1a8 Select next stageable line correctly after staging a range of lines
We already have this very convenient behavior of jumping to the next stageable
line after staging something. However, while this worked well for staging
single lines or hunks, it didn't work correctly when staging a range of lines;
in this case we want to start searching from the first line of the range.
2023-02-15 21:29:00 +01:00
stk 97daec7228 Add test demonstrating selection bug when staging a range of lines
The selected line is not in the right position after staging a range of lines;
see next commit.
2023-02-15 21:28:05 +01:00
stk ff2a799200 Make SelectedLine/SelectedLineIdx work in staging/stagingSecondary views
While we try to keep the view's cursor position in sync with the context state's
selectedLineIdx (at least when pressing up or down), there are enough situations
where the two run out of sync; for example when initially opening the view, or
after staging a hunk, or when scrolling the view using the wheel. While it would
be possible to fix these situations to keep them always in sync, it doesn't seem
worth it, because the view's cursor position isn't really used for anything
else. So we rather special-case the SelectedLine/SelectedLineIdx functions of
ViewDriver to query the context state's selectedLineIdx directly if it is a
patch explorer context.
2023-02-15 21:22:11 +01:00
Jesse DuffieldandGitHub 31fcec16d9 Merge pull request #2429 from stefanhaller/do-not-autosquash-in-regular-rebase 2023-02-15 20:21:08 +11:00
Jesse Duffield 3cfdae4116 migrate submodule reset test 2023-02-12 18:12:01 +11:00
Jesse Duffield d7956c481d migrate submodule enter test 2023-02-12 18:12:01 +11:00
Jesse Duffield 1c48842277 migrate submodule remove test 2023-02-12 10:47:45 +11:00
Jesse Duffield 010f6d7f6e migrate submodule add test 2023-02-12 10:47:41 +11:00
stk 1da762c295 Explicitly pass --no-autosquash when rebasing
This fixes the problem shown in the previous commit.
2023-02-09 18:21:11 +01:00
stk e357c00d4d Add an integration test showing a problem with autosquash during normal rebase
For users who have the rebase.autoSquash git config set to true, any regular
rebase will squash fixups in addition to rebasing. Not good -- we'll fix that in
the next commit.
2023-02-09 17:35:20 +01:00