summaryrefslogtreecommitdiffstats
path: root/pkg/integration
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-03 14:16:43 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-08 22:54:52 +1000
commit6c4e7ee9729ccfd65ac03073a37bd110a61be432 (patch)
tree95d647609ccfe231a0c01cb2ac6f701f5257050d /pkg/integration
parent631cf1e873f4bf802d28bc48fc2621c6fdf96c39 (diff)
Add busy count for integration tests
Integration tests need to be notified when Lazygit is idle so they can progress to the next assertion / user action.
Diffstat (limited to 'pkg/integration')
-rw-r--r--pkg/integration/components/assertion_helper.go2
-rw-r--r--pkg/integration/tests/commit/reword.go1
-rw-r--r--pkg/integration/tests/diff/diff_and_apply_patch.go2
-rw-r--r--pkg/integration/tests/interactive_rebase/squash_fixups_above_first_commit.go2
4 files changed, 5 insertions, 2 deletions
diff --git a/pkg/integration/components/assertion_helper.go b/pkg/integration/components/assertion_helper.go
index 48cc14741..f7e435a1f 100644
--- a/pkg/integration/components/assertion_helper.go
+++ b/pkg/integration/components/assertion_helper.go
@@ -13,6 +13,8 @@ type assertionHelper struct {
// milliseconds we'll wait when an assertion fails.
func retryWaitTimes() []int {
+ return []int{0}
+
if os.Getenv("LONG_WAIT_BEFORE_FAIL") == "true" {
// CI has limited hardware, may be throttled, runs tests in parallel, etc, so we
// give it more leeway compared to when we're running things locally.
diff --git a/pkg/integration/tests/commit/reword.go b/pkg/integration/tests/commit/reword.go
index 48941b7d2..21727c494 100644
--- a/pkg/integration/tests/commit/reword.go
+++ b/pkg/integration/tests/commit/reword.go
@@ -61,6 +61,7 @@ var Reword = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Commits().
Lines(
Contains(wipCommitMessage),
+ Contains(commitMessage),
)
},
})
diff --git a/pkg/integration/tests/diff/diff_and_apply_patch.go b/pkg/integration/tests/diff/diff_and_apply_patch.go
index caf2338b4..c0c95cc17 100644
--- a/pkg/integration/tests/diff/diff_and_apply_patch.go
+++ b/pkg/integration/tests/diff/diff_and_apply_patch.go
@@ -62,7 +62,7 @@ var DiffAndApplyPatch = NewIntegrationTest(NewIntegrationTestArgs{
Tap(func() {
t.ExpectPopup().Menu().Title(Equals("Diffing")).Select(Contains("Exit diff mode")).Confirm()
- t.Views().Information().Content(DoesNotContain("Building patch"))
+ t.Views().Information().Content(Contains("Building patch"))
}).
Press(keys.Universal.CreatePatchOptionsMenu)
diff --git a/pkg/integration/tests/interactive_rebase/squash_fixups_above_first_commit.go b/pkg/integration/tests/interactive_rebase/squash_fixups_above_first_commit.go
index 8c9fed0a4..4e5fe28f6 100644
--- a/pkg/integration/tests/interactive_rebase/squash_fixups_above_first_commit.go
+++ b/pkg/integration/tests/interactive_rebase/squash_fixups_above_first_commit.go
@@ -30,7 +30,7 @@ var SquashFixupsAboveFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
Content(Contains("Are you sure you want to create a fixup! commit for commit")).
Confirm()
}).
- NavigateToLine(Contains("commit 01")).
+ NavigateToLine(Contains("commit 01").DoesNotContain("fixup!")).
Press(keys.Commits.SquashAboveCommits).
Tap(func() {
t.ExpectPopup().Confirmation().