Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertofrontado/7186b209be9e9f95273030c8ec5ae0b7 to your computer and use it in GitHub Desktop.
Save robertofrontado/7186b209be9e9f95273030c8ec5ae0b7 to your computer and use it in GitHub Desktop.
SnapshotTesting-Test-Button-LoadingState
func test_buttonLoadingState() {
let button = Button(frame: .init(x: 0, y: 0, width: 128, height: 48))
button.setTitle("Login", for: .normal)
button.isLoading = true
let result = verifySnapshot(matching: button,
as: .image,
named: "Loading",
testName: "Button")
XCTAssertNil(result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment