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:
Stefan Haller 2025-03-10 19:20:41 +01:00
parent 030c2e5aef
commit 0b5504aa98
38 changed files with 358 additions and 358 deletions

View file

@ -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"),
)
},
})