summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/demo/interactive_rebase.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2024-03-23 20:48:54 +1100
committerGitHub <noreply@github.com>2024-03-23 20:48:54 +1100
commit1337a943fe06c58e4f7783ddad4c2d7f91d43054 (patch)
tree12c47d72bc136cf1a4954865478ad683966eeefe /pkg/integration/tests/demo/interactive_rebase.go
parent3675570a391b1a49ddd198b4c7e71e17701d4404 (diff)
parent471ea397582775476d5636c6c5179b89e411e4e9 (diff)
Update interactive rebase demo (#3392)
**PR Description** This is in anticipation of the new release which supports range-select. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs (specifically `docs/Config.md`) have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc <!-- Be sure to name your PR with an imperative e.g. 'Add worktrees view' see https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0 for examples -->
Diffstat (limited to 'pkg/integration/tests/demo/interactive_rebase.go')
-rw-r--r--pkg/integration/tests/demo/interactive_rebase.go22
1 files changed, 13 insertions, 9 deletions
diff --git a/pkg/integration/tests/demo/interactive_rebase.go b/pkg/integration/tests/demo/interactive_rebase.go
index 3d6709d87..b4a7337d6 100644
--- a/pkg/integration/tests/demo/interactive_rebase.go
+++ b/pkg/integration/tests/demo/interactive_rebase.go
@@ -14,12 +14,12 @@ var InteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{
setDefaultDemoConfig(config)
},
SetupRepo: func(shell *Shell) {
- shell.CreateFile("my-file.txt", "myfile content")
- shell.CreateFile("my-other-file.rb", "my-other-file content")
+ shell.CreateRepoHistory()
- shell.CreateNCommitsWithRandomMessages(60)
shell.NewBranch("feature/demo")
+ shell.CreateNCommitsWithRandomMessages(10)
+
shell.CloneIntoRemote("origin")
shell.SetBranchUpstream("feature/demo", "origin/feature/demo")
@@ -30,14 +30,18 @@ var InteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Commits().
IsFocused().
- NavigateToLine(Contains("Add TypeScript types to User module")).
- Press(keys.Universal.Edit).
- SelectPreviousItem().
+ Press(keys.Commits.StartInteractiveRebase).
+ PressFast(keys.Universal.RangeSelectDown).
+ PressFast(keys.Universal.RangeSelectDown).
+ Press(keys.Commits.MarkCommitAsFixup).
+ PressFast(keys.Commits.MoveDownCommit).
+ PressFast(keys.Commits.MoveDownCommit).
+ Delay().
+ SelectNextItem().
+ SelectNextItem().
Press(keys.Universal.Remove).
- SelectPreviousItem().
+ SelectNextItem().
Press(keys.Commits.SquashDown).
- SelectPreviousItem().
- Press(keys.Commits.MarkCommitAsFixup).
Press(keys.Universal.CreateRebaseOptionsMenu).
Tap(func() {
t.ExpectPopup().Menu().