diff options
Diffstat (limited to 'pkg/integration/tests/commit/staged_without_hooks.go')
-rw-r--r-- | pkg/integration/tests/commit/staged_without_hooks.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pkg/integration/tests/commit/staged_without_hooks.go b/pkg/integration/tests/commit/staged_without_hooks.go index 9b46f4259..be0d43904 100644 --- a/pkg/integration/tests/commit/staged_without_hooks.go +++ b/pkg/integration/tests/commit/staged_without_hooks.go @@ -15,41 +15,41 @@ var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{ CreateFile("myfile", "myfile content\nwith a second line"). CreateFile("myfile2", "myfile2 content") }, - Run: func(shell *Shell, input *Input, keys config.KeybindingConfig) { - input.Model().CommitCount(0) + Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) { + t.Model().CommitCount(0) // stage the file - input.Views().Files(). + t.Views().Files(). IsFocused(). SelectedLine(Contains("myfile")). PressPrimaryAction(). PressEnter() // we start with both lines having been staged - input.Views().StagingSecondary().Content( + t.Views().StagingSecondary().Content( Contains("+myfile content").Contains("+with a second line"), ) - input.Views().Staging().Content( + t.Views().Staging().Content( DoesNotContain("+myfile content").DoesNotContain("+with a second line"), ) // unstage the selected line - input.Views().StagingSecondary(). + t.Views().StagingSecondary(). IsFocused(). PressPrimaryAction(). Tap(func() { // the line should have been moved to the main view - input.Views().Staging().Content(Contains("+myfile content").DoesNotContain("+with a second line")) + t.Views().Staging().Content(Contains("+myfile content").DoesNotContain("+with a second line")) }). Content(DoesNotContain("+myfile content").Contains("+with a second line")). Press(keys.Files.CommitChangesWithoutHook) commitMessage := ": my commit message" - input.ExpectCommitMessagePanel().InitialText(Contains("WIP")).Type(commitMessage).Confirm() + t.ExpectCommitMessagePanel().InitialText(Contains("WIP")).Type(commitMessage).Confirm() - input.Model().CommitCount(1) - input.Model().HeadCommitMessage(Equals("WIP" + commitMessage)) - input.Views().StagingSecondary().IsFocused() + t.Model().CommitCount(1) + t.Model().HeadCommitMessage(Equals("WIP" + commitMessage)) + t.Views().StagingSecondary().IsFocused() // TODO: assert that the staging panel has been refreshed (it currently does not get correctly refreshed) }, |