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

4
Clocker/Preferences/General/PreferencesViewController.swift

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

Loading…
Cancel
Save