Skip to content

Commit

Permalink
Wait in demo after setting caption
Browse files Browse the repository at this point in the history
This looks nicer than waiting a second and then showing the caption as the action begins
  • Loading branch information
jesseduffield committed Aug 1, 2023
1 parent a200fcc commit f43fd7a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/integration/components/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/tests/demo/bisect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/tests/demo/cherry_pick.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/tests/demo/commit_and_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/tests/demo/interactive_rebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/tests/demo/nuke_working_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down

0 comments on commit f43fd7a

Please sign in to comment.