Browse Source

Fix tests.

pull/101/head
Abhishek Banthia 3 years ago
parent
commit
f5cbc1f48c
  1. 4
      Clocker/ClockerUITests/PanelTests.swift
  2. 4
      Clocker/Preferences/General/PreferencesViewController.swift

4
Clocker/ClockerUITests/PanelTests.swift

@ -69,7 +69,7 @@ class PanelTests: XCTestCase {
func testEnablingUpcomingEventView() {
app.tapMenubarIcon()
let upcomingView = app.buttons["CalendarAccessory"]
let upcomingView = app.collectionViews["UpcomingEventCollectionView"]
let beforeUpcomingEventViewExist = upcomingView.exists
app.buttons["Preferences"].click()
@ -101,7 +101,7 @@ class PanelTests: XCTestCase {
app.tapMenubarIcon()
let newUpcomingEventView = app.buttons["CalendarAccessory"]
let newUpcomingEventView = app.collectionViews["UpcomingEventCollectionView"]
let afterUpcomingEventViewExists = newUpcomingEventView.exists
XCTAssertNotEqual(afterUpcomingEventViewExists, beforeUpcomingEventViewExist)

4
Clocker/Preferences/General/PreferencesViewController.swift

@ -45,7 +45,7 @@ class PreferencesViewController: ParentViewController {
let dictionary = NSDictionary(contentsOfFile: path),
let apiKey = dictionary["GeocodingKey"] as? String
else {
// assertionFailure("Unable to find the API key")
assertionFailure("Unable to find the API key")
return ""
}
return apiKey
@ -259,7 +259,7 @@ class PreferencesViewController: ParentViewController {
private func setupShortcutObserver() {
let defaults = NSUserDefaultsController.shared
recorderControl.setAccessibility("ShortcutControl")
recorderControl.bind(NSBindingName.value,
to: defaults,
withKeyPath: PreferencesConstants.hotKeyPathIdentifier,

Loading…
Cancel
Save