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:
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
}).
|
||||
|
@ -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()
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user