diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-07-13 13:16:41 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-07-31 08:34:01 +0200 |
commit | e9bbd816de073d4d9250af2aa16876eec54e6de3 (patch) | |
tree | b4a2c98f64e5786eff2e32d0184a01bdab4b5266 /pkg | |
parent | eb6f089a2a595a0600e6e439c4681c84a2c3e093 (diff) |
Make bisect/basic.go test more concrete
- check out a non-main branch before we start
- add authors to expected commits so that we can see whether the commits show an
asterisk
- explicitly check what the top line displays after bisecting has started
This shows that the detached head shows an asterisk, which we don't want. We'll
fix that in the next commit.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/integration/tests/bisect/basic.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pkg/integration/tests/bisect/basic.go b/pkg/integration/tests/bisect/basic.go index e17f0d50f..1dfe6368b 100644 --- a/pkg/integration/tests/bisect/basic.go +++ b/pkg/integration/tests/bisect/basic.go @@ -11,6 +11,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{ Skip: false, SetupRepo: func(shell *Shell) { shell. + NewBranch("mybranch"). CreateNCommits(10) }, SetupConfig: func(cfg *config.AppConfig) {}, @@ -31,20 +32,21 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Commits(). Focus(). - SelectedLine(Contains("commit 10")). - NavigateToLine(Contains("commit 09")). + SelectedLine(Contains("CI commit 10")). + NavigateToLine(Contains("CI commit 09")). Tap(func() { markCommitAsBad() t.Views().Information().Content(Contains("Bisecting")) }). SelectedLine(Contains("<-- bad")). - NavigateToLine(Contains("commit 02")). + NavigateToLine(Contains("CI commit 02")). Tap(markCommitAsGood). + TopLines(Contains("CI commit 10")). // lazygit will land us in the commit between our good and bad commits. - SelectedLine(Contains("commit 05").Contains("<-- current")). + SelectedLine(Contains("CI commit 05").Contains("<-- current")). Tap(markCommitAsBad). - SelectedLine(Contains("commit 04").Contains("<-- current")). + SelectedLine(Contains("CI commit 04").Contains("<-- current")). Tap(func() { markCommitAsGood() @@ -52,7 +54,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectPopup().Alert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm() }). IsFocused(). - Content(Contains("commit 04")) + Content(Contains("CI commit 04")) t.Views().Information().Content(DoesNotContain("Bisecting")) }, |