Use UpstreamBranch for opening pull requests

This commit is contained in:
Luka Markušić
2023-05-31 10:05:43 +02:00
committed by Jesse Duffield
parent 25160b671e
commit 4d258bd981
4 changed files with 38 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
package branch
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var OpenPullRequestNoUpstream = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Open up a pull request with a missing upstream branch",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().
Branches().
Focus().
Press(keys.Branches.CreatePullRequest)
t.ExpectPopup().Alert().
Title(Equals("Error")).
Content(Contains("Cannot open a pull request for a branch with no upstream")).
Confirm()
},
})