From f43fd7af79c712126c8d9f6e1933d26de9034c56 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 1 Aug 2023 22:19:04 +1000 Subject: Wait in demo after setting caption This looks nicer than waiting a second and then showing the caption as the action begins --- pkg/integration/components/test.go | 1 - pkg/integration/tests/demo/bisect.go | 1 + pkg/integration/tests/demo/cherry_pick.go | 1 + pkg/integration/tests/demo/commit_and_push.go | 1 + pkg/integration/tests/demo/interactive_rebase.go | 1 + pkg/integration/tests/demo/nuke_working_tree.go | 1 + 6 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/integration') diff --git a/pkg/integration/components/test.go b/pkg/integration/components/test.go index d24e20bd5..130ce8774 100644 --- a/pkg/integration/components/test.go +++ b/pkg/integration/components/test.go @@ -190,7 +190,6 @@ func (self *IntegrationTest) Run(gui integrationTypes.GuiDriver) { // Setting caption to clear the options menu from whatever it starts with testDriver.SetCaption("") testDriver.SetCaptionPrefix("") - testDriver.Wait(1000) } self.run(testDriver, keys) diff --git a/pkg/integration/tests/demo/bisect.go b/pkg/integration/tests/demo/bisect.go index b3cfe9936..b001708ea 100644 --- a/pkg/integration/tests/demo/bisect.go +++ b/pkg/integration/tests/demo/bisect.go @@ -28,6 +28,7 @@ var Bisect = NewIntegrationTest(NewIntegrationTestArgs{ }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.SetCaptionPrefix("Git bisect") + t.Wait(1000) markCommitAsBad := func() { t.Views().Commits(). diff --git a/pkg/integration/tests/demo/cherry_pick.go b/pkg/integration/tests/demo/cherry_pick.go index 5732a5b95..0dd34c8b9 100644 --- a/pkg/integration/tests/demo/cherry_pick.go +++ b/pkg/integration/tests/demo/cherry_pick.go @@ -32,6 +32,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{ }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.SetCaptionPrefix("Cherry pick commits from another branch") + t.Wait(1000) t.Views().Branches(). Focus(). diff --git a/pkg/integration/tests/demo/commit_and_push.go b/pkg/integration/tests/demo/commit_and_push.go index e897413e9..a0e196cf0 100644 --- a/pkg/integration/tests/demo/commit_and_push.go +++ b/pkg/integration/tests/demo/commit_and_push.go @@ -28,6 +28,7 @@ var CommitAndPush = NewIntegrationTest(NewIntegrationTestArgs{ }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.SetCaptionPrefix("Stage a file") + t.Wait(1000) t.Views().Files(). IsFocused(). diff --git a/pkg/integration/tests/demo/interactive_rebase.go b/pkg/integration/tests/demo/interactive_rebase.go index f8889d529..fd19e3657 100644 --- a/pkg/integration/tests/demo/interactive_rebase.go +++ b/pkg/integration/tests/demo/interactive_rebase.go @@ -28,6 +28,7 @@ var InteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.SetCaptionPrefix("Interactive rebase") + t.Wait(1000) t.Views().Commits(). IsFocused(). diff --git a/pkg/integration/tests/demo/nuke_working_tree.go b/pkg/integration/tests/demo/nuke_working_tree.go index d69b06879..dba670c39 100644 --- a/pkg/integration/tests/demo/nuke_working_tree.go +++ b/pkg/integration/tests/demo/nuke_working_tree.go @@ -28,6 +28,7 @@ var NukeWorkingTree = NewIntegrationTest(NewIntegrationTestArgs{ }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.SetCaptionPrefix("Nuke the working tree") + t.Wait(1000) t.Views().Files(). IsFocused(). -- cgit v1.2.3