Browse Source

Fix unit tests.

pull/92/head
Abhishek 4 years ago
parent
commit
66213a874f
  1. 2
      Clocker/ClockerUITests/AboutUsTests.swift
  2. 4
      Clocker/ClockerUnitTests/ClockerUnitTests.swift

2
Clocker/ClockerUITests/AboutUsTests.swift

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

4
Clocker/ClockerUnitTests/ClockerUnitTests.swift

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

Loading…
Cancel
Save