mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-10 11:10:18 +02:00
d772c9f1d4
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE. Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything is in 'Sentence case' there's no need for the distinction. I've got a couple lower case things I've kept: namely, things that show up in parentheses.
37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
package branch
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
var ResetUpstream = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "Reset the upstream of a branch",
|
|
ExtraCmdArgs: []string{},
|
|
Skip: false,
|
|
SetupConfig: func(config *config.AppConfig) {},
|
|
SetupRepo: func(shell *Shell) {
|
|
shell.EmptyCommit("one")
|
|
shell.CloneIntoRemote("origin")
|
|
shell.SetBranchUpstream("master", "origin/master")
|
|
},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
t.Views().Branches().
|
|
Focus().
|
|
Press(keys.Universal.NextScreenMode). // we need to enlargen the window to see the upstream
|
|
Lines(
|
|
Contains("master").Contains("origin master").IsSelected(),
|
|
).
|
|
Press(keys.Branches.SetUpstream).
|
|
Tap(func() {
|
|
t.ExpectPopup().Menu().
|
|
Title(Equals("Set/Unset upstream")).
|
|
Select(Contains("Unset upstream of selected branch")).
|
|
Confirm()
|
|
}).
|
|
Lines(
|
|
Contains("master").DoesNotContain("origin master").IsSelected(),
|
|
)
|
|
},
|
|
})
|