summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/branch
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-27 11:34:41 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-12-27 21:26:18 +1100
commit926ed7b9b2f8119079c0d57f65e67dc4b93ecf7e (patch)
tree0ca30be6a6578dd1345d41444e4816254bdbb94a /pkg/integration/tests/branch
parent8052ac4fd6f4ea96fbfb7a3ff16799ba981be82a (diff)
more refactoring of popup stuff
Diffstat (limited to 'pkg/integration/tests/branch')
-rw-r--r--pkg/integration/tests/branch/checkout_by_name.go2
-rw-r--r--pkg/integration/tests/branch/delete.go2
-rw-r--r--pkg/integration/tests/branch/reset.go2
-rw-r--r--pkg/integration/tests/branch/suggestions.go7
4 files changed, 9 insertions, 4 deletions
diff --git a/pkg/integration/tests/branch/checkout_by_name.go b/pkg/integration/tests/branch/checkout_by_name.go
index 17fd214af..e855b7103 100644
--- a/pkg/integration/tests/branch/checkout_by_name.go
+++ b/pkg/integration/tests/branch/checkout_by_name.go
@@ -30,7 +30,7 @@ var CheckoutByName = NewIntegrationTest(NewIntegrationTestArgs{
input.Prompt().Title(Equals("Branch name:")).Type("new-branch").Confirm()
- input.Alert(Equals("Branch not found"), Equals("Branch not found. Create a new branch named new-branch?"))
+ input.Alert().Title(Equals("Branch not found")).Content(Equals("Branch not found. Create a new branch named new-branch?")).Confirm()
assert.CurrentView().Name("localBranches").
Lines(
diff --git a/pkg/integration/tests/branch/delete.go b/pkg/integration/tests/branch/delete.go
index 815d40d45..c28668bb5 100644
--- a/pkg/integration/tests/branch/delete.go
+++ b/pkg/integration/tests/branch/delete.go
@@ -26,7 +26,7 @@ var Delete = NewIntegrationTest(NewIntegrationTestArgs{
)
input.Press(keys.Universal.Remove)
- input.Alert(Equals("Error"), Contains("You cannot delete the checked out branch!"))
+ input.Alert().Title(Equals("Error")).Content(Contains("You cannot delete the checked out branch!")).Confirm()
input.NextItem()
diff --git a/pkg/integration/tests/branch/reset.go b/pkg/integration/tests/branch/reset.go
index 8be35e4ec..821373934 100644
--- a/pkg/integration/tests/branch/reset.go
+++ b/pkg/integration/tests/branch/reset.go
@@ -36,7 +36,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
input.Press(keys.Commits.ViewResetOptions)
- input.Menu(Contains("reset to other-branch"), Contains("hard reset"))
+ input.Menu().Title(Contains("reset to other-branch")).Select(Contains("hard reset")).Confirm()
// ensure that we've returned from the menu before continuing
assert.CurrentView().Name("localBranches")
diff --git a/pkg/integration/tests/branch/suggestions.go b/pkg/integration/tests/branch/suggestions.go
index 7631ad735..f9399296d 100644
--- a/pkg/integration/tests/branch/suggestions.go
+++ b/pkg/integration/tests/branch/suggestions.go
@@ -27,7 +27,12 @@ var Suggestions = NewIntegrationTest(NewIntegrationTestArgs{
// we expect the first suggestion to be the branch we want because it most
// closely matches what we typed in
- input.Typeahead(Equals("Branch name:"), "branch-to", Contains("branch-to-checkout"))
+ input.Prompt().
+ Title(Equals("Branch name:")).
+ Type("branch-to").
+ SuggestionTopLines(Contains("branch-to-checkout")).
+ SelectFirstSuggestion().
+ Confirm()
assert.CurrentBranchName("branch-to-checkout")
},