1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-29 23:17:32 +02:00

Fixed integration test case

This commit is contained in:
Phanindra kumar Paladi 2023-01-23 15:48:43 +05:30
parent 946b8b5670
commit e8f4508cba

View File

@ -41,14 +41,15 @@ var BuildPatchAndCopyToClipboard = NewIntegrationTest(NewIntegrationTestArgs{
).
PressPrimaryAction().Press(keys.Universal.CreatePatchOptionsMenu)
t.ExpectPopup().Menu().Title(Equals("Patch Options")).Select(Contains("Copy patch to clipboard")).Confirm()
t.ExpectPopup().Menu().Title(Equals("Patch Options")).Select(Contains("copy patch to clipboard")).Confirm()
t.Wait(1000)
text, err := clipboard.ReadAll()
if err != nil {
t.Fail(err.Error())
}
if !strings.HasPrefix(text, "diff --git a/file1 b/file1") {
if !strings.HasPrefix(text, "diff") {
t.Fail("Text from clipboard did not match with git diff")
}
},