From 9e2a3a87dd73b9a8979dd2ae5546303a94b5d75a Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 19:05:48 +1100 Subject: [PATCH] improved commit test --- pkg/integration/tests/commit/commit.go | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pkg/integration/tests/commit/commit.go b/pkg/integration/tests/commit/commit.go index 6ed75a797..741a1da99 100644 --- a/pkg/integration/tests/commit/commit.go +++ b/pkg/integration/tests/commit/commit.go @@ -20,18 +20,42 @@ var Commit = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Files(). IsFocused(). + Lines( + Contains("?? myfile").IsSelected(), + Contains("?? myfile2"), + ). PressPrimaryAction(). // stage file + Lines( + Contains("A myfile").IsSelected(), + Contains("?? myfile2"), + ). SelectNextItem(). PressPrimaryAction(). // stage other file + Lines( + Contains("A myfile"), + Contains("A myfile2").IsSelected(), + ). Press(keys.Files.CommitChanges) commitMessage := "my commit message" t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm() + t.Views().Files(). + IsEmpty() + t.Views().Commits(). + Focus(). Lines( - Contains(commitMessage), + Contains(commitMessage).IsSelected(), + ). + PressEnter() + + t.Views().CommitFiles(). + IsFocused(). + Lines( + Contains("A myfile"), + Contains("A myfile2"), ) }, })