Skip to content

Commit

Permalink
add test for custom icons
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-skyscanner committed Dec 19, 2024
1 parent f77eded commit aa892f3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Backpack-SwiftUI/Tests/Icons/BPKIconViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@ class BPKIconViewTests: XCTestCase {
func testAutoMirrorSmallIcon() {
assertSnapshot(BPKIconView(.arrowLeft, size: .small))
}

func testCustomSmallIcon() {
let bundle = Bundle(for: BPKIconViewTests.self)
assertSnapshot(BPKIconView(BPKIcon(name: "custom-icon", bundle: TestsBundle.bundle!), size: .small))
}

func testCustomLargeIcon() {
let bundle = Bundle(for: BPKIconViewTests.self)
assertSnapshot(BPKIconView(BPKIcon(name: "custom-icon", bundle: TestsBundle.bundle!), size: .large))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "custom-icon-lg.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "custom-icon-sm.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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 aa892f3

Please sign in to comment.