mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
move popup assertions into a struct
This commit is contained in:
@ -19,14 +19,14 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
t.Views().Commits().
|
||||
Press(keys.Commits.ViewBisectOptions)
|
||||
|
||||
t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as bad`)).Confirm()
|
||||
t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as bad`)).Confirm()
|
||||
}
|
||||
|
||||
markCommitAsGood := func() {
|
||||
t.Views().Commits().
|
||||
Press(keys.Commits.ViewBisectOptions)
|
||||
|
||||
t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
|
||||
t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
|
||||
}
|
||||
|
||||
t.Views().Commits().
|
||||
@ -49,7 +49,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
markCommitAsGood()
|
||||
|
||||
// commit 5 is the culprit because we marked 4 as good and 5 as bad.
|
||||
t.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm()
|
||||
t.ExpectPopup().Alert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm()
|
||||
}).
|
||||
IsFocused().
|
||||
Content(Contains("commit 04"))
|
||||
|
@ -32,9 +32,9 @@ var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SelectNextItem().
|
||||
Press(keys.Commits.ViewBisectOptions).
|
||||
Tap(func() {
|
||||
t.ExpectMenu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
|
||||
t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`mark .* as good`)).Confirm()
|
||||
|
||||
t.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 08.*Do you want to reset")).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"))
|
||||
}).
|
||||
|
Reference in New Issue
Block a user