summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/branch/open_pull_request_no_upstream.go
diff options
context:
space:
mode:
authorLuka Markušić <luka.markusic@microblink.com>2023-05-31 10:05:43 +0200
committerJesse Duffield <jessedduffield@gmail.com>2023-09-18 13:40:52 +1000
commit4d258bd98144eed7c9e955de6f2b8bb6379aa92b (patch)
tree6aa8855acf458ff1c636bc889922135f36b18b78 /pkg/integration/tests/branch/open_pull_request_no_upstream.go
parent25160b671e8a5ccd2c7ba8437c972ff0fabb136a (diff)
Use UpstreamBranch for opening pull requests
Diffstat (limited to 'pkg/integration/tests/branch/open_pull_request_no_upstream.go')
-rw-r--r--pkg/integration/tests/branch/open_pull_request_no_upstream.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkg/integration/tests/branch/open_pull_request_no_upstream.go b/pkg/integration/tests/branch/open_pull_request_no_upstream.go
new file mode 100644
index 000000000..877f0bdde
--- /dev/null
+++ b/pkg/integration/tests/branch/open_pull_request_no_upstream.go
@@ -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()
+ },
+})