Browse Source

Test fixes.

pull/92/head
Abhishek 4 years ago
parent
commit
8ea6d777fa
  1. 24
      Clocker/ClockerUITests/FloatingWindowTests.swift
  2. 4
      Clocker/ClockerUITests/PreferencesTest.swift
  3. 8
      Clocker/Panel/ParentPanelController.swift
  4. 2
      Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift

24
Clocker/ClockerUITests/FloatingWindowTests.swift

@ -23,6 +23,18 @@ class FloatingWindowTests: XCTestCase {
app.tapMenubarIcon()
app.buttons["Pin"].click()
}
addUIInterruptionMonitor(withDescription: "Reminders Access") { (alert) -> Bool in
print("Interruption Handler called")
print(alert)
let alertButton = alert.buttons["OK"]
if alertButton.exists {
print("Okay button found")
alertButton.tap()
return true
}
return false
}
}
override func tearDown() {
@ -83,18 +95,6 @@ class FloatingWindowTests: XCTestCase {
let remindersCheckbox = app.checkBoxes["ReminderCheckbox"]
remindersCheckbox.click()
addUIInterruptionMonitor(withDescription: "Reminders Access") { (alert) -> Bool in
print("Interruption Handler called")
print(alert)
let alertButton = alert.buttons["OK"]
if alertButton.exists {
print("Okay button found")
alertButton.tap()
return true
}
return false
}
app.buttons["SaveButton"].click()
app.tapMenubarIcon()

4
Clocker/ClockerUITests/PreferencesTest.swift

@ -382,7 +382,9 @@ extension XCTestCase {
}
let searchField = app.searchFields["AvailableSearchField"]
if searchField.isHittable {
searchField.reset(text: place)
}
let results = app.tables["AvailableTimezoneTableView"].cells.staticTexts.matching(matchPredicate)
@ -400,7 +402,9 @@ extension XCTestCase {
results.firstMatch.click()
}
if app.buttons["AddAvailableTimezone"].exists {
app.buttons["AddAvailableTimezone"].click()
}
if shouldSleep {
sleep(2)

8
Clocker/Panel/ParentPanelController.swift

@ -167,11 +167,9 @@ class ParentPanelController: NSWindowController {
name: NSNotification.Name.NSSystemTimeZoneDidChange,
object: nil)
#if DEBUG
// if #available(OSX 11.0, *) {
// mainTableView.style = .fullWidth
// }
#endif
if #available(OSX 11.0, *) {
mainTableView.style = .fullWidth
}
if modernSlider != nil {
modernSlider.enclosingScrollView?.scrollerInsets = NSEdgeInsets(top: 0, left: 0, bottom: 100, right: 0)

2
Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift

@ -213,7 +213,7 @@ class AppFeedbackWindowController: NSWindowController {
contactBox.title = "Contact Information (Optional)".localized()
accessoryInfo.stringValue = "Contact fields are optional! Your contact information will let us contact you in case we need more information or can help!".localized()
let range = NSRange(location: 9, length: 15)
let range = NSRange(location: 9, length: 16)
quickCommentsLabel.title = "Tweet to @Clocker_Support if you have a quick comment!"
setUnderline(for: quickCommentsLabel, range: range)

Loading…
Cancel
Save