Skip to content

Instantly share code, notes, and snippets.

View atakankarsli's full-sized avatar

Atakan Karslı atakankarsli

View GitHub Profile
import UIKit
import XCTest
extension UIImage {
var removeStatusBar: UIImage? {
guard let cgImage = cgImage else {
return nil
}
let yOffset = 50 * scale
import XCTest
import SnapshotTesting
final class DiscoverySnapshotTests: BaseTest {
override func setUp() {
BaseTestHelper.shared.mockDataEnable = true
BaseTestHelper.shared.login = true
super.setUp()
}
import XCTest
import SnapshotTesting
import AccessibilityKit
extension XCTestCase: SnapshotHelperInterface {}
protocol SnapshotHelperInterface: WaitForPredicateExpectation {
}
extension SnapshotHelperInterface {
import SnapshotTesting
import XCTest
class MyViewControllerTests: XCTestCase {
func testMyViewController() {
let vc = MyViewController()
assertSnapshot(matching: vc, as: .image)
}
}
failed -
Couldn't find "minimumPriceLabel", "workingHourLabel", "ratingCountLabel", elements.
Element type for 'minimumPriceLabel' must be 'StaticText'
Element type for 'ratingCountLabel' must be 'StaticText'
Elements on the page:
SearchField: 'searchTextField'
StaticText: 'restaurantLabel'
Image: 'restaurantImageView'
Button: 'workingHourButton'
StaticText: 'minimumPriceLabel'