mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Cleanup: make integration test assertions for files panel more specific
Assert the entire lines using Equals instead of Contains. This makes the tests a bit easier to read, and it makes it much easier to decide how they need to be changed when we change the layout (like we do in the last commit of this branch). It is true that this requires changing all these tests for any future UI changes, but I think this is a good price to pay; those adaptions are trivial and can be done without thinking.
This commit is contained in:
parent
030c2e5aef
commit
0b5504aa98
38 changed files with 358 additions and 358 deletions
|
@ -21,15 +21,15 @@ var RenameSimilarityThresholdChange = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
t.Views().Files().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("D ").Contains("original"),
|
||||
Contains("A ").Contains("renamed"),
|
||||
Equals("D original"),
|
||||
Equals("A renamed"),
|
||||
).
|
||||
Press(keys.Universal.DecreaseRenameSimilarityThreshold).
|
||||
Tap(func() {
|
||||
t.ExpectToast(Equals("Changed rename similarity threshold to 45%"))
|
||||
}).
|
||||
Lines(
|
||||
Contains("R ").Contains("original → renamed"),
|
||||
Equals("R original → renamed"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue