summaryrefslogtreecommitdiffstats
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
parent7aa843c75a9d16472120c1e8869be4c1cfd843af (diff)
move popup assertions into a struct
-rw-r--r--pkg/integration/components/actions.go2
-rw-r--r--pkg/integration/components/popup.go70
-rw-r--r--pkg/integration/components/test_driver.go70
-rw-r--r--pkg/integration/tests/bisect/basic.go6
-rw-r--r--pkg/integration/tests/bisect/from_other_branch.go4
-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
-rw-r--r--pkg/integration/tests/cherry_pick/cherry_pick.go2
-rw-r--r--pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go6
-rw-r--r--pkg/integration/tests/commit/commit.go2
-rw-r--r--pkg/integration/tests/commit/commit_multiline.go2
-rw-r--r--pkg/integration/tests/commit/new_branch.go2
-rw-r--r--pkg/integration/tests/commit/revert.go2
-rw-r--r--pkg/integration/tests/commit/staged.go2
-rw-r--r--pkg/integration/tests/commit/staged_without_hooks.go2
-rw-r--r--pkg/integration/tests/commit/unstaged.go2
-rw-r--r--pkg/integration/tests/custom_commands/form_prompts.go6
-rw-r--r--pkg/integration/tests/custom_commands/menu_from_command.go4
-rw-r--r--pkg/integration/tests/custom_commands/menu_from_commands_output.go4
-rw-r--r--pkg/integration/tests/custom_commands/multiple_prompts.go6
-rw-r--r--pkg/integration/tests/diff/diff.go4
-rw-r--r--pkg/integration/tests/diff/diff_and_apply_patch.go6
-rw-r--r--pkg/integration/tests/diff/diff_commits.go4
-rw-r--r--pkg/integration/tests/file/discard_changes.go4
-rw-r--r--pkg/integration/tests/interactive_rebase/amend_merge.go2
-rw-r--r--pkg/integration/tests/misc/confirm_on_quit.go2
-rw-r--r--pkg/integration/tests/stash/rename.go2
-rw-r--r--pkg/integration/tests/stash/stash.go4
-rw-r--r--pkg/integration/tests/stash/stash_including_untracked_files.go4
33 files changed, 130 insertions, 120 deletions
diff --git a/pkg/integration/components/actions.go b/pkg/integration/components/actions.go
index 8489a52f8..fb4114890 100644
--- a/pkg/integration/components/actions.go
+++ b/pkg/integration/components/actions.go
@@ -8,7 +8,7 @@ type Actions struct {
func (self *Actions) ContinueMerge() {
self.t.Views().current().Press(self.t.keys.Universal.CreateRebaseOptionsMenu)
- self.t.ExpectMenu().
+ self.t.ExpectPopup().Menu().
Title(Equals("Rebase Options")).
Select(Contains("continue")).
Confirm()
diff --git a/pkg/integration/components/popup.go b/pkg/integration/components/popup.go
new file mode 100644
index 000000000..7cd2b2ffc
--- /dev/null
+++ b/pkg/integration/components/popup.go
@@ -0,0 +1,70 @@
+package components
+
+type Popup struct {
+ t *TestDriver
+}
+
+func (self *Popup) Confirmation() *ConfirmationAsserter {
+ self.inConfirm()
+
+ return &ConfirmationAsserter{t: self.t}
+}
+
+func (self *Popup) inConfirm() {
+ self.t.assertWithRetries(func() (bool, string) {
+ currentView := self.t.gui.CurrentContext().GetView()
+ return currentView.Name() == "confirmation" && !currentView.Editable, "Expected confirmation popup to be focused"
+ })
+}
+
+func (self *Popup) Prompt() *PromptAsserter {
+ self.inPrompt()
+
+ return &PromptAsserter{t: self.t}
+}
+
+func (self *Popup) inPrompt() {
+ self.t.assertWithRetries(func() (bool, string) {
+ currentView := self.t.gui.CurrentContext().GetView()
+ return currentView.Name() == "confirmation" && currentView.Editable, "Expected prompt popup to be focused"
+ })
+}
+
+func (self *Popup) Alert() *AlertAsserter {
+ self.inAlert()
+
+ return &AlertAsserter{t: self.t}
+}
+
+func (self *Popup) inAlert() {
+ // basically the same thing as a confirmation popup with the current implementation
+ self.t.assertWithRetries(func() (bool, string) {
+ currentView := self.t.gui.CurrentContext().GetView()
+ return currentView.Name() == "confirmation" && !currentView.Editable, "Expected alert popup to be focused"
+ })
+}
+
+func (self *Popup) Menu() *MenuAsserter {
+ self.inMenu()
+
+ return &MenuAsserter{t: self.t}
+}
+
+func (self *Popup) inMenu() {
+ self.t.assertWithRetries(func() (bool, string) {
+ return self.t.gui.CurrentContext().GetView().Name() == "menu", "Expected popup menu to be focused"
+ })
+}
+
+func (self *Popup) CommitMessagePanel() *CommitMessagePanelAsserter {
+ self.inCommitMessagePanel()
+
+ return &CommitMessagePanelAsserter{t: self.t}
+}
+
+func (self *Popup) inCommitMessagePanel() {
+ self.t.assertWithRetries(func() (bool, string) {
+ currentView := self.t.gui.CurrentContext().GetView()
+ return currentView.Name() == "commitMessage", "Expected commit message panel to be focused"
+ })
+}
diff --git a/pkg/integration/components/test_driver.go b/pkg/integration/components/test_driver.go
index d4ca76662..5f2e15435 100644
--- a/pkg/integration/components/test_driver.go
+++ b/pkg/integration/components/test_driver.go
@@ -133,76 +133,16 @@ func (self *TestDriver) inListContext() {
})
}
-func (self *TestDriver) ExpectConfirmation() *ConfirmationAsserter {
- self.inConfirm()
-
- return &ConfirmationAsserter{t: self}
-}
-
-func (self *TestDriver) inConfirm() {
- self.assertWithRetries(func() (bool, string) {
- currentView := self.gui.CurrentContext().GetView()
- return currentView.Name() == "confirmation" && !currentView.Editable, "Expected confirmation popup to be focused"
- })
-}
-
-func (self *TestDriver) ExpectPrompt() *PromptAsserter {
- self.inPrompt()
-
- return &PromptAsserter{t: self}
-}
-
-func (self *TestDriver) inPrompt() {
- self.assertWithRetries(func() (bool, string) {
- currentView := self.gui.CurrentContext().GetView()
- return currentView.Name() == "confirmation" && currentView.Editable, "Expected prompt popup to be focused"
- })
-}
-
-func (self *TestDriver) ExpectAlert() *AlertAsserter {
- self.inAlert()
-
- return &AlertAsserter{t: self}
-}
-
-func (self *TestDriver) inAlert() {
- // basically the same thing as a confirmation popup with the current implementation
- self.assertWithRetries(func() (bool, string) {
- currentView := self.gui.CurrentContext().GetView()
- return currentView.Name() == "confirmation" && !currentView.Editable, "Expected alert popup to be focused"
- })
-}
-
-func (self *TestDriver) ExpectMenu() *MenuAsserter {
- self.inMenu()
-
- return &MenuAsserter{t: self}
-}
-
-func (self *TestDriver) inMenu() {
- self.assertWithRetries(func() (bool, string) {
- return self.gui.CurrentContext().GetView().Name() == "menu", "Expected popup menu to be focused"
- })
-}
-
-func (self *TestDriver) ExpectCommitMessagePanel() *CommitMessagePanelAsserter {
- self.inCommitMessagePanel()
-
- return &CommitMessagePanelAsserter{t: self}
-}
-
-func (self *TestDriver) inCommitMessagePanel() {
- self.assertWithRetries(func() (bool, string) {
- currentView := self.gui.CurrentContext().GetView()
- return currentView.Name() == "commitMessage", "Expected commit message panel to be focused"
- })
-}
-
// for making assertions on lazygit views
func (self *TestDriver) Views() *Views {
return &Views{t: self}
}
+// for interacting with popups
+func (self *TestDriver) ExpectPopup() *Popup {
+ return &Popup{t: self}
+}
+
// for making assertions through git itself
func (self *TestDriver) Git() *Git {
return &Git{assertionHelper: self.assertionHelper, shell: self.shell}
diff --git a/pkg/integration/tests/bisect/basic.go b/pkg/integration/tests/bisect/basic.go
index 5092f2f0a..ca06d5fa5 100644
--- a/pkg/integration/tests/bisect/basic.go
+++ b/pkg/integration/tests/bisect/basic.go
@@ -19,14 +19,14 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Commits().
Press(keys.Commits.ViewBisectOptions)
- t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as bad`)).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as bad`)).Confirm()
}
markCommitAsGood := func() {
t.Views().Commits().
Press(keys.Commits.ViewBisectOptions)
- t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
}
t.Views().Commits().
@@ -49,7 +49,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
markCommitAsGood()
// commit 5 is the culprit because we marked 4 as good and 5 as bad.
- t.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm()
+ t.ExpectPopup().Alert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm()
}).
IsFocused().
Content(Contains("commit 04"))
diff --git a/pkg/integration/tests/bisect/from_other_branch.go b/pkg/integration/tests/bisect/from_other_branch.go
index 7c2307bd6..ecac6ea3f 100644
--- a/pkg/integration/tests/bisect/from_other_branch.go
+++ b/pkg/integration/tests/bisect/from_other_branch.go
@@ -32,9 +32,9 @@ var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{
SelectNextItem().
Press(keys.Commits.ViewBisectOptions).
Tap(func() {
- t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
- t.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 08.*Do you want to reset")).Confirm()
+ t.ExpectPopup().Alert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 08.*Do you want to reset")).Confirm()
t.Views().Information().Content(DoesNotContain("bisecting"))
}).
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")).
diff --git a/pkg/integration/tests/cherry_pick/cherry_pick.go b/pkg/integration/tests/cherry_pick/cherry_pick.go
index a9d7dd9c7..7aaaf36f1 100644
--- a/pkg/integration/tests/cherry_pick/cherry_pick.go
+++ b/pkg/integration/tests/cherry_pick/cherry_pick.go
@@ -60,7 +60,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
).
Press(keys.Commits.PasteCommits).
Tap(func() {
- t.ExpectAlert().
+ t.ExpectPopup().Alert().
Title(Equals("Cherry-Pick")).
Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).
Confirm()
diff --git a/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go b/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go
index c41de78b3..df9988c2a 100644
--- a/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go
+++ b/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go
@@ -47,9 +47,9 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
).
Press(keys.Commits.PasteCommits)
- t.ExpectAlert().Title(Equals("Cherry-Pick")).Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).Confirm()
+ t.ExpectPopup().Alert().Title(Equals("Cherry-Pick")).Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).Confirm()
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Auto-merge failed")).
Content(Contains("Conflicts!")).
Confirm()
@@ -65,7 +65,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
SelectNextItem().
PressPrimaryAction()
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("continue")).
Content(Contains("all merge conflicts resolved. Continue?")).
Confirm()
diff --git a/pkg/integration/tests/commit/commit.go b/pkg/integration/tests/commit/commit.go
index dc0615c87..6ed75a797 100644
--- a/pkg/integration/tests/commit/commit.go
+++ b/pkg/integration/tests/commit/commit.go
@@ -27,7 +27,7 @@ var Commit = NewIntegrationTest(NewIntegrationTestArgs{
commitMessage := "my commit message"
- t.ExpectCommitMessagePanel().Type(commitMessage).Confirm()
+ t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm()
t.Views().Commits().
Lines(
diff --git a/pkg/integration/tests/commit/commit_multiline.go b/pkg/integration/tests/commit/commit_multiline.go
index 1a5175146..4967ffb77 100644
--- a/pkg/integration/tests/commit/commit_multiline.go
+++ b/pkg/integration/tests/commit/commit_multiline.go
@@ -22,7 +22,7 @@ var CommitMultiline = NewIntegrationTest(NewIntegrationTestArgs{
PressPrimaryAction().
Press(keys.Files.CommitChanges)
- t.ExpectCommitMessagePanel().Type("first line").AddNewline().AddNewline().Type("third line").Confirm()
+ t.ExpectPopup().CommitMessagePanel().Type("first line").AddNewline().AddNewline().Type("third line").Confirm()
t.Views().Commits().
Lines(
diff --git a/pkg/integration/tests/commit/new_branch.go b/pkg/integration/tests/commit/new_branch.go
index 16ae79b35..d3cd58f23 100644
--- a/pkg/integration/tests/commit/new_branch.go
+++ b/pkg/integration/tests/commit/new_branch.go
@@ -28,7 +28,7 @@ var NewBranch = NewIntegrationTest(NewIntegrationTestArgs{
Press(keys.Universal.New).
Tap(func() {
branchName := "my-branch-name"
- t.ExpectPrompt().Title(Contains("New Branch Name")).Type(branchName).Confirm()
+ t.ExpectPopup().Prompt().Title(Contains("New Branch Name")).Type(branchName).Confirm()
t.Git().CurrentBranchName(branchName)
}).
diff --git a/pkg/integration/tests/commit/revert.go b/pkg/integration/tests/commit/revert.go
index 0f9c3fb9e..3b55aa65d 100644
--- a/pkg/integration/tests/commit/revert.go
+++ b/pkg/integration/tests/commit/revert.go
@@ -23,7 +23,7 @@ var Revert = NewIntegrationTest(NewIntegrationTestArgs{
).
Press(keys.Commits.RevertCommit).
Tap(func() {
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Revert commit")).
Content(MatchesRegexp(`Are you sure you want to revert \w+?`)).
Confirm()
diff --git a/pkg/integration/tests/commit/staged.go b/pkg/integration/tests/commit/staged.go
index d5c5dc84e..09bcf2815 100644
--- a/pkg/integration/tests/commit/staged.go
+++ b/pkg/integration/tests/commit/staged.go
@@ -46,7 +46,7 @@ var Staged = NewIntegrationTest(NewIntegrationTestArgs{
Press(keys.Files.CommitChanges)
commitMessage := "my commit message"
- t.ExpectCommitMessagePanel().Type(commitMessage).Confirm()
+ t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm()
t.Views().Commits().
Lines(
diff --git a/pkg/integration/tests/commit/staged_without_hooks.go b/pkg/integration/tests/commit/staged_without_hooks.go
index 32cd8df06..620f712f9 100644
--- a/pkg/integration/tests/commit/staged_without_hooks.go
+++ b/pkg/integration/tests/commit/staged_without_hooks.go
@@ -46,7 +46,7 @@ var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{
Press(keys.Files.CommitChangesWithoutHook)
commitMessage := ": my commit message"
- t.ExpectCommitMessagePanel().InitialText(Contains("WIP")).Type(commitMessage).Confirm()
+ t.ExpectPopup().CommitMessagePanel().InitialText(Contains("WIP")).Type(commitMessage).Confirm()
t.Views().Commits().
Lines(
diff --git a/pkg/integration/tests/commit/unstaged.go b/pkg/integration/tests/commit/unstaged.go
index a3792e1b7..c0e26b281 100644
--- a/pkg/integration/tests/commit/unstaged.go
+++ b/pkg/integration/tests/commit/unstaged.go
@@ -40,7 +40,7 @@ var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{
Press(keys.Files.CommitChanges)
commitMessage := "my commit message"
- t.ExpectCommitMessagePanel().Type(commitMessage).Confirm()
+ t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm()
t.Views().Commits().
Lines(
diff --git a/pkg/integration/tests/custom_commands/form_prompts.go b/pkg/integration/tests/custom_commands/form_prompts.go
index c843232ee..dcb41c83e 100644
--- a/pkg/integration/tests/custom_commands/form_prompts.go
+++ b/pkg/integration/tests/custom_commands/form_prompts.go
@@ -61,11 +61,11 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
IsFocused().
Press("a")
- t.ExpectPrompt().Title(Equals("Enter a file name")).Type("my file").Confirm()
+ t.ExpectPopup().Prompt().Title(Equals("Enter a file name")).Type("my file").Confirm()
- t.ExpectMenu().Title(Equals("Choose file content")).Select(Contains("bar")).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Choose file content")).Select(Contains("bar")).Confirm()
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Are you sure?")).
Content(Equals("Are you REALLY sure you want to make this file? Up to you buddy.")).
Confirm()
diff --git a/pkg/integration/tests/custom_commands/menu_from_command.go b/pkg/integration/tests/custom_commands/menu_from_command.go
index 71a6a5c15..db856c807 100644
--- a/pkg/integration/tests/custom_commands/menu_from_command.go
+++ b/pkg/integration/tests/custom_commands/menu_from_command.go
@@ -50,9 +50,9 @@ var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
Focus().
Press("a")
- t.ExpectMenu().Title(Equals("Choose commit message")).Select(Contains("bar")).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Choose commit message")).Select(Contains("bar")).Confirm()
- t.ExpectPrompt().Title(Equals("Description")).Type(" my branch").Confirm()
+ t.ExpectPopup().Prompt().Title(Equals("Description")).Type(" my branch").Confirm()
t.Views().Files().
Focus().
diff --git a/pkg/integration/tests/custom_commands/menu_from_commands_output.go b/pkg/integration/tests/custom_commands/menu_from_commands_output.go
index b4b649efd..123e27695 100644
--- a/pkg/integration/tests/custom_commands/menu_from_commands_output.go
+++ b/pkg/integration/tests/custom_commands/menu_from_commands_output.go
@@ -48,12 +48,12 @@ var MenuFromCommandsOutput = NewIntegrationTest(NewIntegrationTestArgs{
Focus().
Press("a")
- t.ExpectPrompt().
+ t.ExpectPopup().Prompt().
Title(Equals("Which git command do you want to run?")).
InitialText(Equals("branch")).
Confirm()
- t.ExpectMenu().Title(Equals("Branch:")).Select(Equals("master")).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Branch:")).Select(Equals("master")).Confirm()
t.Git().CurrentBranchName("master")
},
diff --git a/pkg/integration/tests/custom_commands/multiple_prompts.go b/pkg/integration/tests/custom_commands/multiple_prompts.go
index 519160b88..b1592d03b 100644
--- a/pkg/integration/tests/custom_commands/multiple_prompts.go
+++ b/pkg/integration/tests/custom_commands/multiple_prompts.go
@@ -59,11 +59,11 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
IsFocused().
Press("a")
- t.ExpectPrompt().Title(Equals("Enter a file name")).Type("myfile").Confirm()
+ t.ExpectPopup().Prompt().Title(Equals("Enter a file name")).Type("myfile").Confirm()
- t.ExpectMenu().Title(Equals("Choose file content")).Select(Contains("bar")).Confirm()
+ t.ExpectPopup().Menu().Title(Equals("Choose file content")).Select(Contains("bar")).Confirm()
- t.ExpectConfirmation().
+ t.ExpectPopup().Confirmation().
Title(Equals("Are you sure?")).
Content(Equals("Are you REALLY sure you want to make this file? Up to you