diff --git a/pkg/integration/tests/commit/stage_range_of_lines.go b/pkg/integration/tests/commit/stage_range_of_lines.go index 5cac85d49..beef83ae4 100644 --- a/pkg/integration/tests/commit/stage_range_of_lines.go +++ b/pkg/integration/tests/commit/stage_range_of_lines.go @@ -20,9 +20,10 @@ var StageRangeOfLines = NewIntegrationTest(NewIntegrationTestArgs{ Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Files(). IsFocused(). - PressEnter() + Press(keys.Universal.FocusMainView) - t.Views().Staging(). + t.Views().Main(). + IsFocused(). Content( Contains("-1st\n-2nd\n+1st changed\n+2nd changed\n 3rd\n 4th\n-5th\n+5th changed\n 6th"), ). diff --git a/pkg/integration/tests/commit/staged.go b/pkg/integration/tests/commit/staged.go index aac40313b..29a694f49 100644 --- a/pkg/integration/tests/commit/staged.go +++ b/pkg/integration/tests/commit/staged.go @@ -28,25 +28,25 @@ var Staged = NewIntegrationTest(NewIntegrationTestArgs{ ). SelectNextItem(). PressPrimaryAction(). // stage the file - PressEnter() + Press(keys.Universal.FocusMainView) - t.Views().StagingSecondary(). + t.Views().Secondary(). IsFocused(). Tap(func() { // we start with both lines having been staged - t.Views().StagingSecondary().Content(Contains("+myfile content")) - t.Views().StagingSecondary().Content(Contains("+with a second line")) - t.Views().Staging().Content(DoesNotContain("+myfile content")) - t.Views().Staging().Content(DoesNotContain("+with a second line")) + t.Views().Secondary().Content(Contains("+myfile content")) + t.Views().Secondary().Content(Contains("+with a second line")) + t.Views().Main().Content(DoesNotContain("+myfile content")) + t.Views().Main().Content(DoesNotContain("+with a second line")) }). // unstage the selected line PressPrimaryAction(). Tap(func() { // the line should have been moved to the main view - t.Views().StagingSecondary().Content(DoesNotContain("+myfile content")) - t.Views().StagingSecondary().Content(Contains("+with a second line")) - t.Views().Staging().Content(Contains("+myfile content")) - t.Views().Staging().Content(DoesNotContain("+with a second line")) + t.Views().Secondary().Content(DoesNotContain("+myfile content")) + t.Views().Secondary().Content(Contains("+with a second line")) + t.Views().Main().Content(Contains("+myfile content")) + t.Views().Main().Content(DoesNotContain("+with a second line")) }). Press(keys.Files.CommitChanges) @@ -58,10 +58,9 @@ var Staged = NewIntegrationTest(NewIntegrationTestArgs{ Contains(commitMessage), ) - t.Views().StagingSecondary(). - IsEmpty() + t.Views().Secondary().IsInvisible() - t.Views().Staging(). + t.Views().Main(). IsFocused(). Content(Contains("+myfile content")). Content(DoesNotContain("+with a second line")) diff --git a/pkg/integration/tests/commit/staged_without_hooks.go b/pkg/integration/tests/commit/staged_without_hooks.go index b4e16c8ea..fe3c9fa4e 100644 --- a/pkg/integration/tests/commit/staged_without_hooks.go +++ b/pkg/integration/tests/commit/staged_without_hooks.go @@ -34,23 +34,23 @@ var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{ ). SelectNextItem(). PressPrimaryAction(). - PressEnter() + Press(keys.Universal.FocusMainView) // we start with both lines having been staged - t.Views().StagingSecondary().Content( + t.Views().Secondary().Content( Contains("+myfile content").Contains("+with a second line"), ) - t.Views().Staging().Content( + t.Views().Main().Content( DoesNotContain("+myfile content").DoesNotContain("+with a second line"), ) // unstage the selected line - t.Views().StagingSecondary(). + t.Views().Secondary(). IsFocused(). PressPrimaryAction(). Tap(func() { // the line should have been moved to the main view - t.Views().Staging().Content(Contains("+myfile content").DoesNotContain("+with a second line")) + t.Views().Main().Content(Contains("+myfile content").DoesNotContain("+with a second line")) }). Content(DoesNotContain("+myfile content").Contains("+with a second line")). Press(keys.Files.CommitChangesWithoutHook) @@ -63,10 +63,9 @@ var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{ Contains(commitMessage), ) - t.Views().StagingSecondary(). - IsEmpty() + t.Views().Secondary().IsInvisible() - t.Views().Staging(). + t.Views().Main(). IsFocused(). Content(Contains("+myfile content")). Content(DoesNotContain("+with a second line")) diff --git a/pkg/integration/tests/commit/unstaged.go b/pkg/integration/tests/commit/unstaged.go index 043e6ea9c..fbe094a30 100644 --- a/pkg/integration/tests/commit/unstaged.go +++ b/pkg/integration/tests/commit/unstaged.go @@ -27,20 +27,20 @@ var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{ Contains("myfile2"), ). SelectNextItem(). - PressEnter() + Press(keys.Universal.FocusMainView) - t.Views().Staging(). + t.Views().Main(). IsFocused(). Tap(func() { - t.Views().StagingSecondary().Content(DoesNotContain("+myfile content")) - t.Views().Staging().SelectedLine(Equals("+myfile content")) + t.Views().Secondary().Content(DoesNotContain("+myfile content")) + t.Views().Main().SelectedLine(Equals("+myfile content")) }). // stage the first line PressPrimaryAction(). Tap(func() { - t.Views().Staging().Content(DoesNotContain("+myfile content")). + t.Views().Main().Content(DoesNotContain("+myfile content")). SelectedLine(Equals("+with a second line")) - t.Views().StagingSecondary().Content(Contains("+myfile content")) + t.Views().Secondary().Content(Contains("+myfile content")) }). Press(keys.Files.CommitChanges) @@ -52,7 +52,7 @@ var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{ Contains(commitMessage), ) - t.Views().Staging().IsFocused() + t.Views().Main().IsFocused() // TODO: assert that the staging panel has been refreshed (it currently does not get correctly refreshed) }, diff --git a/pkg/integration/tests/stash/stash_staged_partial_file.go b/pkg/integration/tests/stash/stash_staged_partial_file.go index f77c6e16c..7e5ecfa59 100644 --- a/pkg/integration/tests/stash/stash_staged_partial_file.go +++ b/pkg/integration/tests/stash/stash_staged_partial_file.go @@ -19,9 +19,10 @@ var StashStagedPartialFile = NewIntegrationTest(NewIntegrationTestArgs{ Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Files(). IsFocused(). - PressEnter() + Press(keys.Universal.FocusMainView) - t.Views().Staging(). + t.Views().Main(). + IsFocused(). Content( Contains(" line1\n-line2\n+line2 mod\n line3\n-line4\n+line4 mod"), ).