Skip to content

Commit

Permalink
add skeleton loading snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiMadlener committed Jan 29, 2025
1 parent 959e03e commit 32b043a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tests/SpeziViewsTests/SnapshotTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,18 @@ final class SnapshotTests: XCTestCase {
assertSnapshot(of: listHeader1, as: .image(layout: .device(config: .iPhone13Pro)), named: "list-header")
#endif
}

@MainActor
func testSkeletonLoading() {
let view =
RoundedRectangle(cornerRadius: 10)
.frame(height: 100)
.skeletonLoading(replicationCount: 5, repeatInterval: 1.5, spacing: 16)
.padding()

#if os(iOS)
assertSnapshot(of: view, as: .image(layout: .device(config: .iPhone13Pro)), named: "skeleton-loading")
#endif
}

Check failure on line 220 in Tests/SpeziViewsTests/SnapshotTests.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint / SwiftLint

Vertical Whitespace before Closing Braces Violation: Don't include vertical whitespace (empty line) before closing braces (vertical_whitespace_closing_braces)
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32b043a

Please sign in to comment.