Converge on same naming convention for snapshots in the preview tests as in the UI tests.

This commit is contained in:
Stefan Ceriu
2025-03-04 18:33:39 +02:00
committed by Stefan Ceriu
parent ffafca6d64
commit fb8a1f33d8
2286 changed files with 2932 additions and 3029 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ extension PreviewTests {
// MARK: - PreviewProvider
{% for type in types.types where (type.implements.TestablePreview or type.based.TestablePreview or type|annotated:"TestablePreview") and type.name != "TestablePreview" %}
func test_{{ type.name|lowerFirstLetter|replace:"_Previews", "" }}() async throws {
for preview in {{ type.name }}._allPreviews {
try await assertSnapshots(matching: preview)
func test{{ type.name|replace:"_Previews", "" }}() async throws {
for (index, preview) in {{ type.name }}._allPreviews.enumerated() {
try await assertSnapshots(matching: preview, step: index)
}
}
{%- if not forloop.last %}