From f5cbc1f48c9e1ba33c4c55c3fb785447aee663b7 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Sat, 14 Aug 2021 11:57:01 -0500 Subject: [PATCH] Fix tests. --- Clocker/ClockerUITests/PanelTests.swift | 4 ++-- Clocker/Preferences/General/PreferencesViewController.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Clocker/ClockerUITests/PanelTests.swift b/Clocker/ClockerUITests/PanelTests.swift index ad42cbb1..f4c98d7c 100644 --- a/Clocker/ClockerUITests/PanelTests.swift +++ b/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) diff --git a/Clocker/Preferences/General/PreferencesViewController.swift b/Clocker/Preferences/General/PreferencesViewController.swift index 294e00f3..107a6aed 100644 --- a/Clocker/Preferences/General/PreferencesViewController.swift +++ b/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,