Commit graph

770 commits

Author SHA1 Message Date
Stefan Haller c21633b1be Prompt for commit message when moving a custom patch to a new commit 2023-07-23 13:55:48 +02:00
Jesse Duffield 7807b40322 Better tag creation UX
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message
prompt.

I've had to update other uses of that prompt to allow the summary and description labels to
be passed in
2023-07-22 14:36:35 +10:00
Jesse Duffield b46623ebef Use fuzzy search when filtering a view
This adds fuzzy filtering instead of exact match filtering, which is more forgiving of typos
and allows more efficiency.
2023-07-22 13:14:29 +10:00
Jesse Duffield 3cee37388c Keep track of authors across local commits and branch commits for suggestions
Previously, we would only show the authors based on local commits, but sometimes you want to set a commit author
to that of a commit on another branch. Now, so long as you've viewed the branch's commits, the author will appear
as a suggestion.
2023-07-22 10:47:04 +10:00
Jesse Duffield 932e01b41a Add test for crashing on empty menu 2023-07-20 21:08:56 +10:00
Jesse Duffield 866e0a618b Add integration test for accordion mode 2023-07-19 22:17:29 +10:00
Jesse Duffield b61ca21a84 Allow checking for merge conflicts after running a custom command
We have a use-case to rebind 'm' to the merge action in the branches panel. There's three ways to handle this:
1) For all global keybindings, define a per-panel key that invokes it
2) Give a name to all controller actions and allow them to be invoked in custom commands
3) Allow checking for merge conflicts after running a custom command so that users can add their own 'git merge' custom command
that matches the in-built action

Option 1 is hairy, Option 2 though good for users introduces new backwards compatibility issues that I don't want to do
right now, and option 3 is trivially easy to implement so that's what I'm doing.

I've put this under an 'after' key so that we can add more things later. I'm imagining other things like being able to
move the cursor to a newly added item etc.

I considered always running this hook by default but I'd rather not: it's matching on the output text and I'd rather something
like that be explicitly opted-into to avoid cases where we erroneously believe that there are conflicts.
2023-07-13 18:40:34 +10:00
Stefan Haller 62ab41c310 Fix pull rebase tests
It seems that older git versions would drop empty commits when rebasing. Since
this aspect is not relevant to what we're testing here, fix this by simply
avoiding empty commits in these tests.
2023-07-10 15:09:17 +02:00
Ryooooooga 85f7aa9d7b Fix conflict test
The test apply_in_reverse_with_conflict.go fails in git versions 2.30.8 and
earlier. Apparently the output "Applied patch to 'file2' cleanly" was only added
more recently. It's not essential that we check this output.
2023-07-10 15:09:17 +02:00
Stefan Haller 1d96ade0ba Remove StashWithMessage function
It's identical to Stash(), so use that.
2023-07-10 15:09:17 +02:00
Jesse Duffield 16ed3c2377 Retry on index.lock error
I don't know why we're getting index.lock errors but they're impossile to stop
anyway given that other processes can be calling git commands. So we're retrying
a few times before re-raising. To do this we need to clone the command and the current
implementation for that is best-effort.

I do worry about the maintainability of that but we'll see how it goes.

Also, I thought you'd need to clone the task (if it exists) but now I think not;
as long as you don't call done twice on it you should be fine, and you shouldn't
be done'ing a task as part of running a command: that should happen higher up.
2023-07-10 19:13:18 +10:00
Jesse Duffield fdee0e1497 Fix test
It's still skipped but it had an error
2023-07-09 20:57:18 +10:00
Jesse Duffield 6c4e7ee972 Add busy count for integration tests
Integration tests need to be notified when Lazygit is idle so they can progress to the next assertion / user action.
2023-07-08 22:54:52 +10:00
Jesse Duffield 1a36cb9f3f
View filtering (#2680) 2023-07-03 12:57:11 +10:00
Jesse Duffield 8e46b8a275 Use searching, not filtering, in file tree views
There's more work to be done to support filtering for these views so we're sticking with searching for now
2023-07-03 12:54:14 +10:00
Jesse Duffield cd989d8ebe Fix escape logic for remote branches
The remote branches controller was using its own escape method meaning it didn't go through the flow of cancelling
an active filter. It's now using the same approach as the sub-commits and commit-files contexts: defining a parent
context to return to upon hittin escape.
2023-07-03 12:54:14 +10:00
Jesse Duffield 261f30f49c Add integration tests for searching/filtering 2023-07-03 12:54:14 +10:00
Jesse Duffield fd861826bc Add integration tests for discarding files 2023-07-03 12:54:13 +10:00
Gustavo Krieger 9ae7710850 Use comment char config on interactive rebase
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2023-07-02 02:07:32 -03:00
Gustavo Krieger cff9850374 Add tests of interactive rebase with custom comment character 2023-07-02 02:07:32 -03:00
Stefan Haller 51a558040d Fix the title and text (and variable names) of the Discard Changes prompt
The title was saying "Unstage lines", which was just wrong. The text said
"Delete lines", which can be seen as a bit misleading; we are only discarding
the changes to the selected lines, not deleting the lines themselves.

For consistency, rename the config variable skipUnstageLineWarning accordingly.
2023-06-26 08:15:35 +02:00
Stefan Haller 1998d0724f Add a test for stopping at an "edit" command that conflicts
This test is almost identical to swap_in_rebase_with_conflict.go, except that it
sets the commit that will conflict to "edit".

This test is interesting because there's special code needed to determine
whether an "edit" command conflicted or not, i.e. whether to show the "confl"
entry. In this case we do. We have lots of other tests already that have "edit"
commands that don't conflict, so that's covered already.
2023-06-22 18:57:58 +02:00
Stefan Haller 3928d0ebda Insert fake todo entry for a conflicting commit that is being applied
When stopping in a rebase because of a conflict, it is nice to see the commit
that git is trying to apply. Create a fake todo entry labelled "conflict" for
this, and show the "<-- YOU ARE HERE ---" string for that one (in red) instead
of for the real current head.
2023-06-22 18:57:58 +02:00
Stefan Haller d66ca7751c Add test for rewording a commit and failing with an error
The point of this test is to verify that the <--- YOU ARE HERE --- display is
correct when the last command in a rebase was "reword".
2023-06-22 18:57:43 +02:00
Stefan Haller ba160cb5db Add test for a pick that fails and gets rescheduled
This test is interesting because it already behaves as desired: since git has
rescheduled the "pick" command, we do _not_ want to show a "conflict" entry in
this case, as we would see the same commit twice then.
2023-06-22 18:57:43 +02:00
Stefan Haller 3d76c734aa Add test for amending a commit, causing a conflict 2023-06-22 18:57:43 +02:00
Stefan Haller cddf056f4d Extend test to expect what commits we want to be listed when there's a conflict 2023-06-22 18:57:43 +02:00
Stefan Haller 1f42c8a387 Allow discarding changes only from local commits
We use CommitFilesController also for the files of commits that we show
elsewhere, e.g. for branch commits, tags, or stashes. It doesn't make sense to
discard changes from those (for stashes it might be possible to implement it
somehow, but that would be a new feature), so we disallow it unless we are in
the local commits panel.
2023-06-07 12:48:56 +02:00
Stefan Haller 5c55ce6555 Better prompt for discarding old file changes
Lazygit knows what kind of file change this is, so there doesn't have to be any
"if" in the prompt text.
2023-06-07 12:47:03 +02:00
Jesse Duffield c92e687d3b Fix focus issue when opening recent-repos menu at launch
I don't know why we were setting the initial context to CurrentSideContext
and not just CurrentContext in the first place. If there is no current context
in either case it'll default to the files context. So the only issue is if
we anticipated that some random context would be focused and we didn't want to
activate that. But I can't think of any situation where that would happen.
2023-06-07 18:27:18 +10:00
Jesse Duffield a9ae5063c2 Fix flakey test
Whenever we perform an action in a test, we should assert on the result before doing the next action.
This prevents issues where the test moves too fast for our code. It would be nice to not have to do this,
but for now that's the situation
2023-06-03 15:54:03 +10:00
Jesse Duffield dd34adb36c Support matchers on integers in integration tests 2023-06-03 15:32:23 +10:00
Jesse Duffield 4ff02bd3b7 Add integration test for commit highlighting on focus
A better refactor would be to allow matchers to assert against either a string or a slice of cells, so that I could have
the same ergonomics that I have elsewhere, but this is a start.
2023-06-01 22:20:30 +10:00
Stefan Haller 16dceb813b Show menu instead of prompt when there are conflicts in a rebase or merge
This solves the issue that previously you could too easily abort a rebase
accidentally by hitting escape.
2023-06-01 10:51:48 +02:00
Jesse Duffield 036a1ea519 Support suggestions generated from command in custom commands
This changes the interface a bit but it was only added earlier today so I doubt anybody is dependent on it yet.

I'm also updating the docs.
2023-05-29 22:47:35 +10:00
Jesse Duffield 16fa22a36e Add suggestionsPreset to custom commands system 2023-05-29 14:24:49 +10:00
Jesse Duffield d772c9f1d4 Use sentence case everywhere
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-05-25 23:52:19 +10:00
Jesse Duffield fb0931e1a1 Fix discard logic
Missed a spot a couple PR's ago. We had an integration test which caught this but which was skipped due
to index.lock file issues. The test was also broken for other reasons due to it not having been running
for a while, so I've fixed that up too.
2023-05-23 20:23:08 +10:00
Jesse Duffield 63dc07fded Construct arg vector manually rather than parse string
By constructing an arg vector manually, we no longer need to quote arguments

Mandate that args must be passed when building a command

Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.

For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there
2023-05-23 19:49:19 +10:00
Stefan Haller 401610c0ef Remove the toast when toggling "ignore whitespace"
Now that we visualize the state, the toast is no longer needed.
2023-05-20 12:58:32 +10:00
Jesse Duffield 681a9bf20d
Merge pull request #2612 from longlhh90/fix-commit-prefixes-with-empty-commit-message 2023-05-17 17:12:05 +10:00
Lukas 0606b7a43b remove empty message check as message of commit can be empty 2023-05-17 17:07:50 +10:00
Stefan Haller 595c7ee73e Extend one of the filtering tests to start on a commit other than the first
Enabling the filter selects the first entry in the filtered commits view. It's
useful to have a test that checks this, as I almost broke it in the following
commit (it needs an added FocusLine call in the setFiltering function in
filtering_menu_action.go).
2023-05-11 13:23:58 +02:00
Jesse Duffield 2b30085dba Merge branch 'master' into refactor-better-encapsulation 2023-05-11 19:00:01 +10:00
Stefan Haller d607b366cb Add own version for test move_to_earlier_commit for older git versions 2023-05-02 16:27:32 +02:00
Stefan Haller c8f26aca68 Rename From to AtLeast 2023-05-02 16:27:32 +02:00
Jesse Duffield 5dacbb6293 merge master into refactor-better-encapsulation 2023-05-02 19:05:42 +10:00
Stefan Haller fba1a2b5ac Add config gui.experimentalShowBranchHeads
People find the new (*) display for branch heads in the commits list confusing,
so make it opt-in for now.
2023-05-02 18:58:54 +10:00
Jesse Duffield ee9ae8f07f
Merge pull request #2552 from stefanhaller/support-stacked-branches 2023-05-01 21:07:19 +10:00
Jesse Duffield a57310df24 Retain commit message when cycling history
When cycling history, we want to make it so that upon returning to the original prompt, you get your text back.
Importantly, we don't want to use the existing preservedMessage field for that because that's only for preserving
a NEW commit message, and we don't want the history stuff of the commit reword flow to overwrite that.
2023-04-30 13:19:54 +10:00
Sean 9d68b287db Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting.
By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel,
and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message
from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel
and then 'enter' to submit the message.

We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept,
so we just push both contexts one after the other, and likewise remove both contexts when we escape.
2023-04-30 13:19:53 +10:00
Jesse Duffield 2e32e55957 update integration test for toggling whitespace 2023-04-30 13:19:53 +10:00
Jesse Duffield 0cd5257523 Retain commit message when cycling history
When cycling history, we want to make it so that upon returning to the original prompt, you get your text back.
Importantly, we don't want to use the existing preservedMessage field for that because that's only for preserving
a NEW commit message, and we don't want the history stuff of the commit reword flow to overwrite that.
2023-04-30 12:17:34 +10:00
Sean 49da7b482d Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting.
By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel,
and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message
from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel
and then 'enter' to submit the message.

We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept,
so we just push both contexts one after the other, and likewise remove both contexts when we escape.
2023-04-30 12:17:34 +10:00
Stefan Haller 3fe4db9316 Make RebaseCommands.AmendTo more robust
This fixes two problems with the "amend commit with staged changes" command:

1. Amending to a fixup commit didn't work (this would create a commmit with the
   title "fixup! fixup! original title" and keep that at the top of the branch)
2. Unrelated fixup commits would be squashed too.

The added integration test verifies that both of these problems are fixed.
2023-04-29 07:28:33 +02:00
Stefan Haller d50c58b4c6 Implement "edit commit" in terms of the new EditRebase function 2023-04-29 07:28:33 +02:00
AzraelSec 08a445eb9d test: check focus on commits after performing an advanced rebase 2023-04-15 11:01:55 +02:00
Jesse Duffield 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
AzraelSec b82b6a2992 test: add integration test to verify the interactive rebase correctly work 2023-04-15 17:26:08 +10:00
AzraelSec 3422b1e218 test: update the UI to follow the new rebase type selection instead of confirm the previous popup 2023-04-15 17:26:08 +10:00
Stefan Haller 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
Stefan Haller 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
Jesse Duffield 7f5465a27b fix flaky tests 2023-04-14 21:01:45 +10:00
Stefan Haller 6a340ec840 Reorder tests 2023-04-13 19:17:08 +02:00
Stefan Haller 3535cd0f94 Rename test files to match test names 2023-04-13 19:17:08 +02:00
Luka Markušić 2b4ac986a2 Don't add custom command to history if it starts with space
Add tests for custom command with leading space
2023-04-13 21:20:46 +10:00
Stefan Haller d508badd62 Better error message when trying to amend a commit other than head during rebase 2023-04-01 08:16:15 +02:00
Luka Markušić e7d0116312 Allow amending the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
Stefan Haller 7513d77567 Add integration test for amending from the files panel 2023-04-01 08:16:15 +02:00
Stefan Haller 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
Stefan Haller b24955063c Allow rewording the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
Jesse Duffield 4780953cef
Merge pull request #2377 from shinhs0506/clear-staging-after-commit 2023-03-24 19:13:00 +11:00
John Shin 776d8f4d2e refresh the staging panel on successful commit
apply formatting
2023-03-20 20:13:59 +11:00
Stefan Haller 4b4dccfd7d
Fix "move patch into new commit" for partial hunk (#2507) 2023-03-18 18:17:47 +11:00
Stefan Haller bf6e9a1bd3 Reenable failing test 2023-03-07 09:49:34 +01:00
Stefan Haller a68cd6af9c Concatenate patches to apply them all at once
This fixes the problem that patching would stop at the first file that has a
conflict. We always want to patch all files.

Also, it's faster for large patches, and the code is a little bit simpler too.
2023-03-07 09:49:34 +01:00
Stefan Haller 4ca012dbfb Add test for reverse-applying a patch that conflicts
The patch contains changes to two files; the first one conflicts, the second
doesn't. Note how it only applies changes to the first file at this point in the
branch; we'll fix this in the next commit.

This test would fail on master for multiple reasons.
2023-03-07 09:49:34 +01:00
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 Duffield 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 Duffield 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 Duffield 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 Duffield 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
stk e57843d947 Add integration test for ignoring whitespace in diff 2023-02-07 13:33:10 +01:00
Jesse Duffield 368d6437b8
Merge pull request #2373 from phanithinks/clipboard_patch_option_2357 2023-01-31 17:02:46 +11:00
Phanindra kumar Paladi d0851113d1 Skipping copy_patch_to_clipboard test case 2023-01-29 10:20:56 +05:30
Ryooooooga 5dec080719
fix: fix RefName of detached HEAD to works in Chinese 2023-01-27 20:45:18 +09:00
Jesse Duffield f7f24dbfc1 better test 2023-01-26 13:25:56 +11:00
Phanindra kumar Paladi c6929c36ae Corrected test assert 2023-01-23 15:53:21 +05:30
Phanindra kumar Paladi e8f4508cba Fixed integration test case 2023-01-23 15:48:43 +05:30
Phanindra kumar Paladi d479a41cad Added Integration testing the copy to clipboard in patchbuilding 2023-01-18 21:05:40 +05:30
Jesse Duffield 6c3671f807 appease linter 2022-12-30 22:47:56 +11:00
Jesse Duffield 89ba3a38b4 migrate filter path tests 2022-12-30 22:42:32 +11:00
Jesse Duffield 6f709456fe migrate test for rename branch and pull 2022-12-30 22:42:32 +11:00
Jesse Duffield 277ca706eb migrate fetchPrune integration test 2022-12-30 22:42:32 +11:00
Jesse Duffield 8a1c763942 more git ignore stuff in integration test 2022-12-30 22:42:32 +11:00
Jesse Duffield f770a6246b rename function 2022-12-28 14:19:56 +11:00
Jesse Duffield 5e9a897348 migrate ignore gitignore integration test 2022-12-28 13:35:07 +11:00
Jesse Duffield f2d0f362d4 migrate discard staged changes test 2022-12-28 13:24:23 +11:00
Jesse Duffield ae07cf5506 migrate discard old file change test 2022-12-28 13:01:32 +11:00
Jesse Duffield 9fef4447b6 move popup assertions into a struct 2022-12-28 11:00:22 +11:00
Jesse Duffield 7aa843c75a create actions struct 2022-12-28 10:54:38 +11:00
Jesse Duffield a3450dfdfc fix suggestions test 2022-12-28 10:41:42 +11:00
Jesse Duffield b4e9806352 fix test 2022-12-28 10:32:36 +11:00
Jesse Duffield 06c878c051 minor changes 2022-12-28 10:23:54 +11:00
Jesse Duffield ed93e0a2b0 remove dependency on model 2022-12-27 22:52:20 +11:00
Jesse Duffield c5050ecabd move shell into test driver 2022-12-27 21:47:37 +11:00
Jesse Duffield 78b495f50a rename input to t 2022-12-27 21:35:36 +11:00
Jesse Duffield 53e06b71ae add tap function 2022-12-27 21:26:18 +11:00
Jesse Duffield b166b8f776 combine assert and input structs, clean up interface 2022-12-27 21:26:18 +11:00
Jesse Duffield 09e80e5f2a better namespacing for assertions 2022-12-27 21:26:18 +11:00
Jesse Duffield be30cbb375 add view asserter getter struct 2022-12-27 21:26:18 +11:00
Jesse Duffield b64f55518b refactor commit message stuff in integration tests 2022-12-27 21:26:18 +11:00
Jesse Duffield 926ed7b9b2 more refactoring of popup stuff 2022-12-27 21:26:18 +11:00
Jesse Duffield 8052ac4fd6 add prompt asserter 2022-12-27 21:26:18 +11:00
Jesse Duffield c976839a63 refactor prompt handling in integration tests 2022-12-27 21:26:17 +11:00
Jesse Duffield 09db4c4397 allow checking if line is selected in Lines and TopLines methods 2022-12-26 17:45:10 +11:00
Jesse Duffield 96310288ee allow chaining matchers 2022-12-26 17:15:33 +11:00
Jesse Duffield c841ba8237 add switch-to-view methods 2022-12-26 16:49:54 +11:00
Jesse Duffield 9a6f21ce42 cleaner test assertions 2022-12-26 12:20:13 +11:00
Jesse Duffield fa0414777f rename SelectedLine to CurrentLine in tests 2022-12-26 10:42:19 +11:00
Jesse Duffield 5d2584a188 introduce ViewLines functions 2022-12-25 11:38:00 +11:00
Jesse Duffield b623ecf898 add helper functions for popups in tests 2022-12-24 19:15:59 +11:00
Jesse Duffield 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
Jesse Duffield 5c11b1ecb7 discard changes integration test 2022-12-24 19:05:46 +11:00
Jesse Duffield 7c7f7bf9b9 migrate diffing integration tests 2022-12-21 22:52:23 +11:00
Jesse Duffield f910b42c9c migrate confirm-on-quit integration test 2022-12-20 23:08:39 +11:00
Jesse Duffield bc4ace8357 add commit revert integration test 2022-12-20 22:45:02 +11:00
Jesse Duffield b40190bd94 add multi-line commit integration test 2022-12-20 22:45:02 +11:00
Jesse Duffield b13cfdfea0 migrate branch reset integration test 2022-12-19 22:38:32 +11:00
navazjm 3a1921cab0 updated rebase confirmation message 2022-12-16 17:36:37 -06:00
Arnaud PERALTA 50b0d85cd3 integration tests for commit without pre-commit hooks in staging files menu 2022-12-01 09:12:18 +11:00
Arnaud PERALTA bfcbf228bf commit integrations test with window name's assertion 2022-12-01 09:12:18 +11:00
Arnaud PERALTA 87e0f6b92d integration tests for commit in staged files and unstaged files menus 2022-12-01 09:12:18 +11:00
Luka Markušić b3d086bdc1 Resolve the prompt just before using it
In case a later command depends on a prompt input from a previous one we
need to evaluate it only after the previous prompt has been confirmed.
2022-11-25 22:46:36 +01:00
Nils Andresen 245563bc99 (#2288) quote remoteName before compiling regex
If the remote name contains special regex-chars,
the compilation of the regex might fail.
Quoting the remoteName ensures that all special chars
in the remoteName are properly escaped before compiling
the regex.
2022-11-24 12:56:28 +00:00
Ryooooooga 52a2e4c1dc fix: fix ambiguous branch name
test: add an integration test for checkout branch by name

fix: fix full ref name of detached head

refactor: refactor current branch loader

chore: use field name explicitly
2022-11-14 19:05:07 +11:00
Andrew Hynes 9e91aa8b43 fix: delete duplicate import 2022-11-12 18:11:34 -03:30
Andrew Hynes 7977c2deb5 fix: delete duplicate line 2022-11-12 18:10:34 -03:30
Andrew Hynes d7fb441a3c refactor: sort list of integration tests 2022-11-12 18:09:55 -03:30
Jesse Duffield 97ced9e14f fix could-not-access error 2022-11-12 18:09:15 -03:30
Andrew Hynes 66a253916e test: add more assertions 2022-11-12 18:09:15 -03:30
Andrew Hynes a47e72892a
Merge branch 'master' into stash-untracked-changes 2022-11-01 16:08:34 -02:30
Ryooooooga 2ec0b671e6
test: update stash/rename integration test 2022-10-16 16:26:17 +09:00
Ryooooooga e78e829e3a
test: add an integration test for rename stash 2022-10-16 09:30:03 +09:00
Gustavo Andrioli 39e84e13f4 Use lazycore utils: Clamp and GetLazyRootDirectory 2022-10-15 13:55:44 -03:00
Andrew Hynes 8c46a0110d
Merge branch 'master' into stash-untracked-changes 2022-10-06 22:59:06 -02:30
Andrew Hynes a30d924afe test: add test for stash including untracked files 2022-10-06 22:53:13 -02:30
Andrew Hynes f4c188fa5b fix(test): add stash name 2022-10-06 22:42:49 -02:30
Jesse Duffield e3f21f0588 strip NUL bytes instead of replacing with space 2022-10-03 09:29:41 -07:00
Jesse Duffield 8858f03606 adjust test temporarily to unblock master 2022-10-02 20:34:14 -07:00
Jesse Duffield c953871ec7 use lowercase 'quote' for consistency with existing custom command template functions 2022-10-02 18:43:25 -07:00
Ryooooooga e16f1ba84f
test: add integration test for Quote 2022-10-01 20:55:49 +09:00
Jesse Duffield 23d39c79b2 update test 2022-09-24 23:37:17 +02:00
Luka Markušić 0141bbde0e Add test for amending a merge commit 2022-09-24 23:37:17 +02:00
Mihai22125 7e9dffe1b9 Add Key field to CustomCommandPrompt struct
Add Form field to CustomCommandObjects struct

Write user prompts responses to Form field

Ensure that map keys exists

Add form prompts integration test

Remove redundant index
2022-09-17 14:58:44 -07:00
Jesse Duffield 850a82784a earlier failure 2022-09-16 22:22:20 -07:00
Jesse Duffield 74acb3e86a add integration tests for cherry picking 2022-09-16 22:15:16 -07:00
Jesse Duffield 7af7af27c6 various changes to improve integration tests 2022-09-16 08:42:39 -07:00
Andrew Hynes db9373662a test: add test for basic stash 2022-09-15 23:11:27 -02:30
Jesse Duffield 7b757d1cfe add branch rebase integration test 2022-09-09 20:55:47 -07:00
Jesse Duffield 843488bff4 add branch delete integration test 2022-09-09 20:55:47 -07:00
Jesse Duffield a9d4ff2aee cleaning up imports 2022-09-09 20:55:47 -07:00
Jesse Duffield 8cdfc6758f add another bisect integration test 2022-09-09 20:55:47 -07:00
Jesse Duffield 010f430d1f add bisect integration test 2022-09-09 20:55:47 -07:00
Jesse Duffield af45692e24 fix CI 2022-08-14 21:34:37 +10:00
Jesse Duffield fed2aaf37f migrate menuFromCommand integration test 2022-08-14 21:30:37 +10:00
Jesse Duffield b2ae651686 add slow flag to integration tests 2022-08-14 20:49:20 +10:00
Jesse Duffield e875d6b448 ensuring you can't accidentally forget to add a test to the tests list 2022-08-14 20:49:20 +10:00
Jesse Duffield 53979f7cec a more complex custom command test 2022-08-14 20:49:20 +10:00
Jesse Duffield 9c0d860980 basic custom command test 2022-08-14 20:49:20 +10:00
Jesse Duffield 2bdefe2049 add assertion to prevent flakiness 2022-08-13 13:56:50 +10:00
Jesse Duffield b8d9443999 rename helpers to components 2022-08-13 13:55:17 +10:00
Jesse Duffield 610eddfe05 fix CI 2022-08-13 13:55:09 +10:00
Jesse Duffield a45b22e12f re-name Input and improve documentation 2022-08-13 13:55:08 +10:00
Jesse Duffield ba96baee32 move code from main into app package to allow test to be injected 2022-08-13 13:55:08 +10:00