From 14cde8016ce0b5a04a460a28c805376e8437988c Mon Sep 17 00:00:00 2001 From: Michael Zimmermann Date: Wed, 25 Oct 2023 17:08:37 +0200 Subject: [PATCH] [Fix] Tab snapshots tests. --- .../Tab/View/UIKit/TabUIViewSnapshotTests.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/Sources/Components/Tab/View/UIKit/TabUIViewSnapshotTests.swift b/core/Sources/Components/Tab/View/UIKit/TabUIViewSnapshotTests.swift index 2eb245691..448a691ff 100644 --- a/core/Sources/Components/Tab/View/UIKit/TabUIViewSnapshotTests.swift +++ b/core/Sources/Components/Tab/View/UIKit/TabUIViewSnapshotTests.swift @@ -14,7 +14,7 @@ final class TabUIViewSnapshotTests: UIKitComponentSnapshotTestCase { // MARK: - Properties let theme = SparkTheme.shared - let names = ["paperplane", "folder", "trash", "pencil", "eraser", "scribble", "lasso"] + let names = ["paperplane", "folder", "trash", "pencil", "scribble", "lasso"] var badge: BadgeUIView! var images: [UIImage]! @@ -22,7 +22,12 @@ final class TabUIViewSnapshotTests: UIKitComponentSnapshotTestCase { override func setUp() { super.setUp() - self.images = names.map{ UIImage.init(systemName: $0)! } + self.images = names.map{ + guard let image = UIImage.init(systemName: $0) else { + fatalError("No Image for \($0)") + } + return image + } self.badge = BadgeUIView(theme: theme, intent: .danger, value: 99, isBorderVisible: false) }