Browse Source

Fix tests!

pull/92/head
Abhishek 4 years ago
parent
commit
ab82c75aaa
  1. 2
      Clocker/ClockerUITests/AboutUsTests.swift
  2. 10
      Clocker/ClockerUnitTests/ClockerUnitTests.swift
  3. 2
      Clocker/Overall App/Logger.swift

2
Clocker/ClockerUITests/AboutUsTests.swift

@ -33,7 +33,7 @@ class AboutUsTests: XCTestCase {
tapAboutTab()
let appDisplayName = "CFBundleDisplayName".localizedString()
let expectedVersion = "\(appDisplayName) 20.05.01 (79)"
let expectedVersion = "\(appDisplayName) 20.07.01 (80)"
guard let presentVersion = app.windows["Clocker"].staticTexts["ClockerVersion"].value as? String else {
XCTFail("Present version not present")
return

10
Clocker/ClockerUnitTests/ClockerUnitTests.swift

@ -154,11 +154,11 @@ class ClockerUnitTests: XCTestCase {
// The below test might fail outside California or if DST is active!
func testTimeDifference() {
XCTAssertTrue(operations.timeDifference() == ", 12 hours 30 mins ahead", "Difference was unexpectedly: \(operations.timeDifference())")
XCTAssertTrue(californiaOperations.timeDifference() == "", "Difference was unexpectedly: \(californiaOperations.timeDifference())")
XCTAssertTrue(floridaOperations.timeDifference() == ", 3 hours ahead", "Difference was unexpectedly: \(floridaOperations.timeDifference())")
XCTAssertTrue(aucklandOperations.timeDifference() == ", 19 hours ahead", "Difference was unexpectedly: \(aucklandOperations.timeDifference())")
XCTAssertTrue(omahaOperations.timeDifference() == ", 2 hours ahead", "Difference was unexpectedly: \(omahaOperations.timeDifference())")
XCTAssertTrue(operations.timeDifference() == ", 10 hours 30 mins ahead", "Difference was unexpectedly: \(operations.timeDifference())")
XCTAssertTrue(californiaOperations.timeDifference() == ", 2 hours behind", "Difference was unexpectedly: \(californiaOperations.timeDifference())")
XCTAssertTrue(floridaOperations.timeDifference() == ", an hour ahead", "Difference was unexpectedly: \(floridaOperations.timeDifference())")
XCTAssertTrue(aucklandOperations.timeDifference() == ", 17 hours ahead", "Difference was unexpectedly: \(aucklandOperations.timeDifference())")
XCTAssertTrue(omahaOperations.timeDifference() == "", "Difference was unexpectedly: \(omahaOperations.timeDifference())")
}
func testSunriseSunset() {

2
Clocker/Overall App/Logger.swift

@ -5,7 +5,7 @@ import os.log
import os.signpost
class Logger: NSObject {
class func log(object: [String: Any]?, for key: NSString) {
class func log(object _: [String: Any]?, for _: NSString) {
// TODO: Use a new analytics solution!
}
}

Loading…
Cancel
Save