1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-01 00:54:58 +02:00

move popup assertions into a struct

This commit is contained in:
Jesse Duffield
2022-12-28 11:00:22 +11:00
parent 7aa843c75a
commit 9fef4447b6
33 changed files with 130 additions and 120 deletions

View File

@ -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(

View File

@ -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(

View File

@ -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)
}).

View File

@ -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()

View File

@ -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(

View File

@ -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(

View File

@ -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(