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

Assert that the search status view is visible

Just to be really sure that it not only contains the expected status text, but
also actually shows it.
This commit is contained in:
Stefan Haller
2024-06-07 16:01:09 +02:00
parent 44ad36bb39
commit 779e6f95a3
2 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
Type("two").
Confirm()
t.Views().Search().Content(Contains("matches for 'two' (1 of 1)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'two' (1 of 1)"))
}).
Lines(
Contains("four"),
@ -46,7 +46,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
Type("o").
Confirm()
t.Views().Search().Content(Contains("matches for 'o' (2 of 3)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'o' (2 of 3)"))
}).
Lines(
Contains("four"),
@ -56,7 +56,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
).
Press("n").
Tap(func() {
t.Views().Search().Content(Contains("matches for 'o' (3 of 3)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'o' (3 of 3)"))
}).
Lines(
Contains("four"),
@ -66,7 +66,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
).
Press("n").
Tap(func() {
t.Views().Search().Content(Contains("matches for 'o' (1 of 3)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'o' (1 of 3)"))
}).
Lines(
Contains("four").IsSelected(),
@ -76,7 +76,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
).
Press("n").
Tap(func() {
t.Views().Search().Content(Contains("matches for 'o' (2 of 3)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'o' (2 of 3)"))
}).
Lines(
Contains("four"),
@ -86,7 +86,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
).
Press("N").
Tap(func() {
t.Views().Search().Content(Contains("matches for 'o' (1 of 3)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'o' (1 of 3)"))
}).
Lines(
Contains("four").IsSelected(),
@ -96,7 +96,7 @@ var Search = NewIntegrationTest(NewIntegrationTestArgs{
).
Press("N").
Tap(func() {
t.Views().Search().Content(Contains("matches for 'o' (3 of 3)"))
t.Views().Search().IsVisible().Content(Contains("matches for 'o' (3 of 3)"))
}).
Lines(
Contains("four"),