mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +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.
47 lines
1.6 KiB
Go
47 lines
1.6 KiB
Go
package bisect
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "Opening lazygit when bisect has been started from another branch. There's an issue where we don't reselect the current branch if we mark the current branch as bad so this test side-steps that problem",
|
|
ExtraCmdArgs: []string{},
|
|
Skip: false,
|
|
SetupRepo: func(shell *Shell) {
|
|
shell.
|
|
EmptyCommit("only commit on master"). // this'll ensure we have a master branch
|
|
NewBranch("other").
|
|
CreateNCommits(10).
|
|
Checkout("master").
|
|
StartBisect("other~2", "other~5")
|
|
},
|
|
SetupConfig: func(cfg *config.AppConfig) {},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
t.Views().Information().Content(Contains("Bisecting"))
|
|
|
|
t.Views().Commits().
|
|
Focus().
|
|
TopLines(
|
|
MatchesRegexp(`<-- bad.*commit 08`),
|
|
MatchesRegexp(`<-- current.*commit 07`),
|
|
MatchesRegexp(`\?.*commit 06`),
|
|
MatchesRegexp(`<-- good.*commit 05`),
|
|
).
|
|
SelectNextItem().
|
|
Press(keys.Commits.ViewBisectOptions).
|
|
Tap(func() {
|
|
t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`Mark .* as good`)).Confirm()
|
|
|
|
t.ExpectPopup().Alert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 08.*Do you want to reset")).Confirm()
|
|
|
|
t.Views().Information().Content(DoesNotContain("Bisecting"))
|
|
}).
|
|
// back in master branch which just had the one commit
|
|
Lines(
|
|
Contains("only commit on master"),
|
|
)
|
|
},
|
|
})
|