diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-12-27 21:35:36 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-12-27 21:35:36 +1100 |
commit | 78b495f50a080822121852dfdf27b481dbbd8879 (patch) | |
tree | 63c519494d4b1a3e3bbe266b8b87a869ba84edc9 /pkg/integration/tests/bisect | |
parent | 53e06b71aecd2ddaf80516627ba223ac2adc5420 (diff) |
rename input to t
Diffstat (limited to 'pkg/integration/tests/bisect')
-rw-r--r-- | pkg/integration/tests/bisect/basic.go | 20 | ||||
-rw-r--r-- | pkg/integration/tests/bisect/from_other_branch.go | 14 |
2 files changed, 17 insertions, 17 deletions
diff --git a/pkg/integration/tests/bisect/basic.go b/pkg/integration/tests/bisect/basic.go index ac4953095..cbb37aac7 100644 --- a/pkg/integration/tests/bisect/basic.go +++ b/pkg/integration/tests/bisect/basic.go @@ -16,33 +16,33 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{ SetupConfig: func(cfg *config.AppConfig) {}, Run: func( shell *Shell, - input *Input, + t *TestDriver, keys config.KeybindingConfig, ) { markCommitAsBad := func() { - input.Views().Commits(). + t.Views().Commits(). Press(keys.Commits.ViewBisectOptions) - input.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as bad`)).Confirm() + t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as bad`)).Confirm() } markCommitAsGood := func() { - input.Views().Commits(). + t.Views().Commits(). Press(keys.Commits.ViewBisectOptions) - input.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm() + t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm() } - input.Model().AtLeastOneCommit() + t.Model().AtLeastOneCommit() - input.Views().Commits(). + t.Views().Commits(). Focus(). SelectedLine(Contains("commit 10")). NavigateToListItem(Contains("commit 09")). Tap(func() { markCommitAsBad() - input.Views().Information().Content(Contains("bisecting")) + t.Views().Information().Content(Contains("bisecting")) }). SelectedLine(Contains("<-- bad")). NavigateToListItem(Contains("commit 02")). @@ -55,11 +55,11 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{ markCommitAsGood() // commit 5 is the culprit because we marked 4 as good and 5 as bad. - input.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm() + t.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm() }). IsFocused(). Content(Contains("commit 04")) - input.Views().Information().Content(DoesNotContain("bisecting")) + t.Views().Information().Content(DoesNotContain("bisecting")) }, }) diff --git a/pkg/integration/tests/bisect/from_other_branch.go b/pkg/integration/tests/bisect/from_other_branch.go index 20f0fb646..8759e28f3 100644 --- a/pkg/integration/tests/bisect/from_other_branch.go +++ b/pkg/integration/tests/bisect/from_other_branch.go @@ -20,14 +20,14 @@ var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{ SetupConfig: func(cfg *config.AppConfig) {}, Run: func( shell *Shell, - input *Input, + t *TestDriver, keys config.KeybindingConfig, ) { - input.Views().Information().Content(Contains("bisecting")) + t.Views().Information().Content(Contains("bisecting")) - input.Model().AtLeastOneCommit() + t.Model().AtLeastOneCommit() - input.Views().Commits(). + t.Views().Commits(). Focus(). TopLines( MatchesRegexp(`<-- bad.*commit 08`), @@ -38,11 +38,11 @@ var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{ SelectNextItem(). Press(keys.Commits.ViewBisectOptions). Tap(func() { - input.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm() + t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm() - input.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 08.*Do you want to reset")).Confirm() + t.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 08.*Do you want to reset")).Confirm() - input.Views().Information().Content(DoesNotContain("bisecting")) + t.Views().Information().Content(DoesNotContain("bisecting")) }). // back in master branch which just had the one commit Lines( |