Skip to content

Commit

Permalink
Add snapshot test verifying XXL dynamic fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-pod committed Jul 3, 2023
1 parent 36e665d commit f701a8a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ADUtilsTests/DynamicFontTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ class DynamicFontTest: QuickSpec {
it("should layout labels properly") {
stackView.layoutIfNeeded()
assertSnapshot(matching: stackView, as: .image, named: "DynamicFontLayoutTest")
assertSnapshot(
matching: stackView,
as: .image(traits: UITraitCollection(preferredContentSizeCategory: .extraExtraExtraLarge)),
named: "DynamicFontLayoutXXLTest"
)
}
}

Expand Down Expand Up @@ -114,6 +119,14 @@ class DynamicFontTest: QuickSpec {
as: .image(layout: .fixed(width: 200, height: 1000)),
named: "SwiftUIDynamicFontLayoutTest"
)
assertSnapshot(
matching: view,
as: .image(
layout: .fixed(width: 200, height: 1000),
traits: UITraitCollection(preferredContentSizeCategory: .extraExtraExtraLarge)
),
named: "SwiftUIDynamicFontLayoutXXLTest"
)
} else {
throw XCTSkip("title2, title3, caption2 are only available on iOS 14")
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 f701a8a

Please sign in to comment.