-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Identifier to inverted snapshot tests
Josh Samuels
committed
Mar 9, 2021
1 parent
f2f4c1c
commit 45e29f4
Showing
10 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,4 +120,4 @@ DEPENDENCIES | |
xcodeproj! | ||
|
||
BUNDLED WITH | ||
1.17.3 | ||
2.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// Copyright 2021 Square Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import AccessibilitySnapshot | ||
import FBSnapshotTestCase | ||
|
||
@testable import AccessibilitySnapshotDemo | ||
|
||
final class IdentifierTests: SnapshotTestCase { | ||
|
||
func testSnapshotIdentifier() { | ||
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") | ||
} | ||
} |
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.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters