|
|
@ -4,7 +4,7 @@ import XCTest |
|
|
|
|
|
|
|
|
|
|
|
extension String { |
|
|
|
extension String { |
|
|
|
func localizedString() -> String { |
|
|
|
func localizedString() -> String { |
|
|
|
let bundle = Bundle(for: AboutUsTests.self) |
|
|
|
let bundle = Bundle(for: FloatingWindowTests.self) |
|
|
|
return NSLocalizedString(self, bundle: bundle, comment: "") |
|
|
|
return NSLocalizedString(self, bundle: bundle, comment: "") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -111,6 +111,10 @@ class FloatingWindowTests: XCTestCase { |
|
|
|
let appearanceTab = app.toolbars.buttons.element(boundBy: 1) |
|
|
|
let appearanceTab = app.toolbars.buttons.element(boundBy: 1) |
|
|
|
appearanceTab.click() |
|
|
|
appearanceTab.click() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select Misc tab |
|
|
|
|
|
|
|
let miscTab = app.tabs.element(boundBy: 1) |
|
|
|
|
|
|
|
miscTab.click() |
|
|
|
|
|
|
|
|
|
|
|
if floatingSlider { |
|
|
|
if floatingSlider { |
|
|
|
app.radioGroups["FutureSlider"].radioButtons["No"].click() |
|
|
|
app.radioGroups["FutureSlider"].radioButtons["No"].click() |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -141,6 +145,10 @@ class FloatingWindowTests: XCTestCase { |
|
|
|
let appearanceTab = app.toolbars.buttons.element(boundBy: 1) |
|
|
|
let appearanceTab = app.toolbars.buttons.element(boundBy: 1) |
|
|
|
appearanceTab.click() |
|
|
|
appearanceTab.click() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Select Misc tab |
|
|
|
|
|
|
|
let miscTab = app.tabs.element(boundBy: 1) |
|
|
|
|
|
|
|
miscTab.click() |
|
|
|
|
|
|
|
|
|
|
|
XCTAssertTrue(app.staticTexts["InformationLabel"].exists) |
|
|
|
XCTAssertTrue(app.staticTexts["InformationLabel"].exists) |
|
|
|
|
|
|
|
|
|
|
|
let generalTab = app.toolbars.buttons.element(boundBy: 0) |
|
|
|
let generalTab = app.toolbars.buttons.element(boundBy: 0) |
|
|
@ -153,6 +161,7 @@ class FloatingWindowTests: XCTestCase { |
|
|
|
XCTAssertFalse(app.staticTexts["InformationLabel"].exists) |
|
|
|
XCTAssertFalse(app.staticTexts["InformationLabel"].exists) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Make sure to ensure supplementary/relative date label is turned on! |
|
|
|
func testMovingSlider() { |
|
|
|
func testMovingSlider() { |
|
|
|
if app.buttons["Pin"].exists { |
|
|
|
if app.buttons["Pin"].exists { |
|
|
|
app.buttons["Pin"].click() |
|
|
|
app.buttons["Pin"].click() |
|
|
@ -161,7 +170,7 @@ class FloatingWindowTests: XCTestCase { |
|
|
|
let floatingSlider = app.sliders["FloatingSlider"].exists |
|
|
|
let floatingSlider = app.sliders["FloatingSlider"].exists |
|
|
|
|
|
|
|
|
|
|
|
if floatingSlider { |
|
|
|
if floatingSlider { |
|
|
|
let tomorrowPredicate = NSPredicate(format: "placeholderValue like %@", "Tomorrow") |
|
|
|
let tomorrowPredicate = NSPredicate(format: "identifier like %@", "RelativeDate") |
|
|
|
let tomorrow = app.tables.tableRows.staticTexts.matching(tomorrowPredicate) |
|
|
|
let tomorrow = app.tables.tableRows.staticTexts.matching(tomorrowPredicate) |
|
|
|
|
|
|
|
|
|
|
|
var previousValues: [String] = [] |
|
|
|
var previousValues: [String] = [] |
|
|
|