1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00

Merge pull request #2550 from jesseduffield/handle-flakey-tests

This commit is contained in:
Jesse Duffield 2023-04-14 21:15:22 +10:00 committed by GitHub
commit 981ba4c66c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -25,6 +25,13 @@ var UndoChooseHunk = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().MergeConflicts().
IsFocused().
Content(Contains("<<<<<<< HEAD\nFirst Change")).
// explicitly asserting on the selection because sometimes the content renders
// before the selection is ready for user input
SelectedLines(
Contains("<<<<<<< HEAD"),
Contains("First Change"),
Contains("======="),
).
PressPrimaryAction().
// choosing the first hunk
Content(DoesNotContain("<<<<<<< HEAD\nFirst Change")).

View File

@ -39,11 +39,15 @@ var ApplyInReverseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
).
// Add both files to the patch; the first will conflict, the second won't
PressPrimaryAction().
Tap(func() {
t.Views().Information().Content(Contains("building patch"))
t.Views().PatchBuildingSecondary().Content(
Contains("+more file1 content"))
}).
SelectNextItem().
PressPrimaryAction()
t.Views().Information().Content(Contains("building patch"))
t.Views().PatchBuildingSecondary().Content(
Contains("+more file1 content").Contains("+more file2 content"))