diff --git a/pkg/integration/tests/filter_and_search/nested_filter.go b/pkg/integration/tests/filter_and_search/nested_filter.go index 6ccb606f2..7400b505e 100644 --- a/pkg/integration/tests/filter_and_search/nested_filter.go +++ b/pkg/integration/tests/filter_and_search/nested_filter.go @@ -71,19 +71,7 @@ var NestedFilter = NewIntegrationTest(NewIntegrationTestArgs{ FilterOrSearch("grape"). Lines( Equals("A grape").IsSelected(), - ). - PressEnter() - - t.Views().PatchBuilding(). - IsFocused(). - FilterOrSearch("newline"). - SelectedLine(Contains("No newline at end of file")). - PressEscape(). // cancel search - Tap(func() { - t.Views().Search().IsInvisible() - }). - // escape to commit-files view - PressEscape() + ) t.Views().CommitFiles(). IsFocused(). diff --git a/pkg/integration/tests/staging/diff_change_screen_mode.go b/pkg/integration/tests/main_view/change_screen_mode_in_focused_diff.go similarity index 58% rename from pkg/integration/tests/staging/diff_change_screen_mode.go rename to pkg/integration/tests/main_view/change_screen_mode_in_focused_diff.go index b42439cc8..c53c9eb1c 100644 --- a/pkg/integration/tests/staging/diff_change_screen_mode.go +++ b/pkg/integration/tests/main_view/change_screen_mode_in_focused_diff.go @@ -1,12 +1,12 @@ -package staging +package main_view import ( "github.com/jesseduffield/lazygit/pkg/config" . "github.com/jesseduffield/lazygit/pkg/integration/components" ) -var DiffChangeScreenMode = NewIntegrationTest(NewIntegrationTestArgs{ - Description: "Change the staged changes screen mode", +var ChangeScreenModeInFocusedDiff = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Enlarge the focused diff, which leaves the pane showing the other side of the file behind", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, @@ -16,32 +16,30 @@ var DiffChangeScreenMode = NewIntegrationTest(NewIntegrationTestArgs{ Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Files(). Focus(). - PressEnter() + Press(keys.Universal.FocusMainView) - t.Views().Staging(). + t.Views().Main(). IsFocused(). PressPrimaryAction(). Title(Equals("Unstaged changes")). Content(Contains("+second line").DoesNotContain("+first line")). PressTab() - t.Views().StagingSecondary(). + t.Views().Secondary(). IsFocused(). Title(Equals("Staged changes")). Content(Contains("+first line").DoesNotContain("+second line")). Press(keys.Universal.NextScreenMode). Tap(func() { - t.Views().AppStatus(). - IsInvisible() - t.Views().Staging(). - IsVisible() + // Half screen: the side panels are gone, the two diff panes are not. + t.Views().AppStatus().IsInvisible() + t.Views().Main().IsVisible() }). Press(keys.Universal.NextScreenMode). Tap(func() { - t.Views().AppStatus(). - IsInvisible() - t.Views().Staging(). - IsInvisible() + // Full screen: the focused pane has the window to itself. + t.Views().AppStatus().IsInvisible() + t.Views().Main().IsInvisible() }) }, }) diff --git a/pkg/integration/tests/test_list.go b/pkg/integration/tests/test_list.go index e635b5a4e..cd4a4c4a0 100644 --- a/pkg/integration/tests/test_list.go +++ b/pkg/integration/tests/test_list.go @@ -24,7 +24,6 @@ import ( "github.com/jesseduffield/lazygit/pkg/integration/tests/reflog" "github.com/jesseduffield/lazygit/pkg/integration/tests/remote" "github.com/jesseduffield/lazygit/pkg/integration/tests/shell_commands" - "github.com/jesseduffield/lazygit/pkg/integration/tests/staging" "github.com/jesseduffield/lazygit/pkg/integration/tests/stash" "github.com/jesseduffield/lazygit/pkg/integration/tests/status" "github.com/jesseduffield/lazygit/pkg/integration/tests/submodule" @@ -376,6 +375,7 @@ var tests = []*components.IntegrationTest{ main_view.BuildPatchFromAReflogEntry, main_view.BuildPatchFromAWholeCommitsDiff, main_view.BuildPatchWithMixedSelections, + main_view.ChangeScreenModeInFocusedDiff, main_view.ClickSelectsDiffLine, main_view.CommitFromMainView, main_view.CopyRowsThatAreNoDiffLine, @@ -513,7 +513,6 @@ var tests = []*components.IntegrationTest{ shell_commands.EditHistory, shell_commands.History, shell_commands.OmitFromHistory, - staging.DiffChangeScreenMode, stash.Apply, stash.ApplyPatch, stash.CreateBranch, diff --git a/pkg/integration/tests/ui/range_select_with_autoscroll.go b/pkg/integration/tests/ui/range_select_with_autoscroll.go index 94a4fb4a5..769ea49fc 100644 --- a/pkg/integration/tests/ui/range_select_with_autoscroll.go +++ b/pkg/integration/tests/ui/range_select_with_autoscroll.go @@ -33,15 +33,5 @@ var RangeSelectWithAutoscroll = NewIntegrationTest(NewIntegrationTestArgs{ OriginYAtLeast(3). SelectedLineIdxAtLeast(3). MouseRelease() - - t.Views().Files(). - Focus(). - PressEnter() - t.Views().Staging(). - ClickAndHold(1, 6). - MouseMoveToBottom(1). - OriginYAtLeast(3). - SelectedLineIdxAtLeast(9). - MouseRelease() }, })