Skip to content

Commit

Permalink
Update PR from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Samuels committed Apr 30, 2021
1 parent 13e94db commit 7afa51c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 42 deletions.
42 changes: 0 additions & 42 deletions Example/SnapshotTests/IdentifierTests.swift

This file was deleted.

30 changes: 30 additions & 0 deletions Example/SnapshotTests/InvertColorsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,34 @@ final class InvertColorsTests: SnapshotTestCase {
SnapshotVerifyWithInvertedColors(viewController.view)
}

func testInvertColorsWithIdentifier() {
// let label = UILabel(frame: .zero)
// label.text = "Hello World"
// label.sizeToFit()
//
// let view = UIView(frame: UIScreen.main.bounds)
// view.backgroundColor = .lightGray
// view.addSubview(label)
//
// label.center = view.center
//
// FBSnapshotVerifyView(view, identifier: "someIdentifier")
//// FBSnapshotVerifyView(view.colorInvert(), identifier: "invertedColors")
// SnapshotVerifyWithInvertedColors(view, identifier: "invertedColors")
//
// // Ensures the view has not been modified after calling SnapshotVerifyWithInvertedColors
// FBSnapshotVerifyView(view, identifier: "someIdentifier")

let viewController = InvertColorsViewController()
viewController.view.frame = UIScreen.main.bounds

FBSnapshotVerifyView(viewController.view, identifier: "originalColors")

SnapshotVerifyWithInvertedColors(viewController.view, identifier: "invertedColors")

// Ensures the view has not been modified after calling SnapshotVerifyWithInvertedColors
FBSnapshotVerifyView(viewController.view, identifier: "originalColors")

}

}

0 comments on commit 7afa51c

Please sign in to comment.