From 0902d0a5ea3ff565fdf8650d0fef897c73d73b22 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 20 Aug 2026 20:59:26 +0200 Subject: [PATCH] Drop test steps owned by the retiring explorers The generic filter and range-selection suites already exercise their state machines on surviving views, while focused-diff tests own range selection and drag autoscroll. Remove only the repetitions that enter an explorer, along with the staging-panel screen-mode test whose UI no longer survives. Co-Authored-By: GitHub Copilot --- .../tests/filter_and_search/nested_filter.go | 14 +--------- .../change_screen_mode_in_focused_diff.go} | 26 +++++++++---------- pkg/integration/tests/test_list.go | 3 +-- .../tests/ui/range_select_with_autoscroll.go | 10 ------- 4 files changed, 14 insertions(+), 39 deletions(-) rename pkg/integration/tests/{staging/diff_change_screen_mode.go => main_view/change_screen_mode_in_focused_diff.go} (58%) 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 c1f5ac92f..47bae5f3d 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" @@ -377,6 +376,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, @@ -516,7 +516,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() }, })