summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/branch
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-28 11:00:22 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-12-28 11:00:22 +1100
commit9fef4447b67c499fe34d40bc5dadc5941ac39b7c (patch)
tree2e1a90e078c2b39bebeefdb3afd07944d6382a0f /pkg/integration/tests/branch
parent7aa843c75a9d16472120c1e8869be4c1cfd843af (diff)
move popup assertions into a struct
Diffstat (limited to 'pkg/integration/tests/branch')
-rw-r--r--pkg/integration/tests/branch/checkout_by_name.go4
-rw-r--r--pkg/integration/tests/branch/delete.go4
-rw-r--r--pkg/integration/tests/branch/rebase.go6
-rw-r--r--pkg/integration/tests/branch/rebase_and_drop.go6
-rw-r--r--pkg/integration/tests/branch/reset.go2
-rw-r--r--pkg/integration/tests/branch/suggestions.go2
6 files changed, 12 insertions, 12 deletions
diff --git a/pkg/integration/tests/branch/checkout_by_name.go b/pkg/integration/tests/branch/checkout_by_name.go
index c786f8970..070a3a433 100644
--- a/pkg/integration/tests/branch/checkout_by_name.go
+++ b/pkg/integration/tests/branch/checkout_by_name.go
@@ -27,9 +27,9 @@ var CheckoutByName = NewIntegrationTest(NewIntegrationTestArgs{
SelectNextItem().
Press(keys.Branches.CheckoutBranchByName).
Tap(func() {
- t.ExpectPrompt().Title(Equals("Branch name:")).Type("new-branch").Confirm()
+ t.ExpectPopup().Prompt().Title(Equals("Branch name:")).Type("new-branch").Confirm()
- t.ExpectAlert().Title(Equals("Branch not found")).Content(Equals("Branch not found. Create a new branch named new-branch?")).Confirm()
+ t.ExpectPopup().Alert().Title(Equals("Branch not found")).Content(Equals("Branch not found. Create a new branch named new-branch?")).Confirm()
}).
Lines(
MatchesRegexp(`\*.*new-branch`).IsSelected(),
diff --git a/pkg/integration/tests/branch/delete.go b/pkg/integration/tests/branch/delete.go
index 520923cd6..7d93513dc 100644
--- a/pkg/integration/tests/branch/delete.go
+++ b/pkg/integration/tests/branch/delete.go
@@ -26,12 +26,12 @@ var Delete = NewIntegrationTest(NewIntegrationTestArgs{
).
Press(keys.Universal.Remove).
Tap(func() {
- t.ExpectAlert().Title(Equals("Error")).Content(Contains("You cannot delete the checked out branch!")).Confirm()
+ t.ExpectPopup().Alert().Title(Equals("Error")).Content(Contains("You cannot delete the checked out branch!")).Confirm()
}).
SelectNextItem().
Press(keys.Universal.Remove).
Tap(func() {
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Delete Branch")).
Content(Contains("Are you sure you want to delete the branch 'branch-one'?")).
Confirm()
diff --git a/pkg/integration/tests/branch/rebase.go b/pkg/integration/tests/branch/rebase.go
index 137bada27..e59aa8cb2 100644
--- a/pkg/integration/tests/branch/rebase.go
+++ b/pkg/integration/tests/branch/rebase.go
@@ -30,12 +30,12 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
SelectNextItem().
Press(keys.Branches.RebaseBranch)
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Rebasing")).
Content(Contains("Are you sure you want to rebase 'first-change-branch' on top of 'second-change-branch'?")).
Confirm()
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Auto-merge failed")).
Content(Contains("Conflicts!")).
Confirm()
@@ -51,7 +51,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Information().Content(Contains("rebasing"))
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("continue")).
Content(Contains("all merge conflicts resolved. Continue?")).
Confirm()
diff --git a/pkg/integration/tests/branch/rebase_and_drop.go b/pkg/integration/tests/branch/rebase_and_drop.go
index 5996eb1fb..5f5341d66 100644
--- a/pkg/integration/tests/branch/rebase_and_drop.go
+++ b/pkg/integration/tests/branch/rebase_and_drop.go
@@ -36,14 +36,14 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
SelectNextItem().
Press(keys.Branches.RebaseBranch)
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Rebasing")).
Content(Contains("Are you sure you want to rebase 'first-change-branch' on top of 'second-change-branch'?")).
Confirm()
t.Views().Information().Content(Contains("rebasing"))
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Auto-merge failed")).
Content(Contains("Conflicts!")).
Confirm()
@@ -78,7 +78,7 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
IsFocused().
PressPrimaryAction()
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("continue")).
Content(Contains("all merge conflicts resolved. Continue?")).
Confirm()
diff --git a/pkg/integration/tests/branch/reset.go b/pkg/integration/tests/branch/reset.go
index 94288c718..0a46ad2a1 100644
--- a/pkg/integration/tests/branch/reset.go
+++ b/pkg/integration/tests/branch/reset.go
@@ -35,7 +35,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
SelectNextItem().
Press(keys.Commits.ViewResetOptions)
- t.ExpectMenu().
+ t.ExpectPopup().Menu().
Title(Contains("reset to other-branch")).
Select(Contains("hard reset")).
Confirm()
diff --git a/pkg/integration/tests/branch/suggestions.go b/pkg/integration/tests/branch/suggestions.go
index bac0fe83b..5b5b23403 100644
--- a/pkg/integration/tests/branch/suggestions.go
+++ b/pkg/integration/tests/branch/suggestions.go
@@ -27,7 +27,7 @@ var Suggestions = NewIntegrationTest(NewIntegrationTestArgs{
// we expect the first suggestion to be the branch we want because it most
// closely matches what we typed in
- t.ExpectPrompt().
+ t.ExpectPopup().Prompt().
Title(Equals("Branch name:")).
Type("branch-to").
SuggestionTopLines(Contains("branch-to-checkout")).