Skip to content

Instantly share code, notes, and snippets.

@KaneCheshire
Last active March 23, 2018 09:19
Show Gist options
  • Save KaneCheshire/8f02935aeb7e0ee385945124d4683bbe to your computer and use it in GitHub Desktop.
Save KaneCheshire/8f02935aeb7e0ee385945124d4683bbe to your computer and use it in GitHub Desktop.
func test_extraSmallDynamicType() throws {
let view = ExampleView.loadFromNib()
let viewModel = ExampleViewModel(title: "A short title", detail: "A subtitle", message: "This is the message!")
let traitCollection = UITraitCollection(preferredContentSizeCategory: .extraSmall)
view.configure(with: viewModel, traitCollection: traitCollection)
try verify(view, layoutStyle: .dynamicHeight(fixedWidth: 320))
}
func test_accessibilityExtraExtraExtraLarge() throws {
let view = ExampleView.loadFromNib()
let viewModel = ExampleViewModel(title: "A short title", detail: "A subtitle", message: "This is the message!")
let traitCollection = UITraitCollection(preferredContentSizeCategory: .accessibilityExtraExtraExtraLarge)
view.configure(with: viewModel, traitCollection: traitCollection)
try verify(view, layoutStyle: .dynamicHeight(fixedWidth: 320))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment