|
|
|
@ -230,34 +230,38 @@ class ThemerTests: XCTestCase {
|
|
|
|
|
private func testSubject(subject: Themer, withExpectatations expectations: ThemeExpectations) { |
|
|
|
|
// Symbol images were introduced in 11.0; Clocker still supports 10.13+ so few asserts below that rely on symbol images will fail. |
|
|
|
|
let eligibleOSVersion = ProcessInfo.processInfo.isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 11, minorVersion: 0, patchVersion: 0)) |
|
|
|
|
|
|
|
|
|
if (eligibleOSVersion) { |
|
|
|
|
XCTAssertEqual(subject.shutdownImage().accessibilityDescription, expectations.expectedShutdownImageName) |
|
|
|
|
XCTAssertEqual(subject.preferenceImage().accessibilityDescription, expectations.expectedPreferenceImageName) |
|
|
|
|
XCTAssertEqual(subject.pinImage().accessibilityDescription, expectations.expectedPinImageName) |
|
|
|
|
XCTAssertEqual(subject.sunriseImage().accessibilityDescription, expectations.expectedSunriseImageName) |
|
|
|
|
XCTAssertEqual(subject.sunsetImage().accessibilityDescription, expectations.expectedSunsetImageName) |
|
|
|
|
XCTAssertEqual(subject.removeImage().accessibilityDescription, expectations.expectedRemoveImageName) |
|
|
|
|
XCTAssertEqual(subject.addImage().accessibilityDescription, expectations.expectedAddImage) |
|
|
|
|
XCTAssertEqual(subject.privacyTabImage().accessibilityDescription, expectations.expectedPrivacyTabImage) |
|
|
|
|
XCTAssertEqual(subject.appearanceTabImage().accessibilityDescription, expectations.expectedAppearanceTabImage) |
|
|
|
|
XCTAssertEqual(subject.calendarTabImage().accessibilityDescription, expectations.expectedCalendarTabImage) |
|
|
|
|
XCTAssertEqual(subject.generalTabImage()?.accessibilityDescription, expectations.expectedGeneralTabImage) |
|
|
|
|
XCTAssertEqual(subject.aboutTabImage()?.accessibilityDescription, expectations.expectedAboutTabImage) |
|
|
|
|
XCTAssertEqual(subject.videoCallImage()?.accessibilityDescription, expectations.expectedVideoCallImage) |
|
|
|
|
XCTAssertEqual(subject.filledTrashImage()?.accessibilityDescription, expectations.expectedFilledTrashImage) |
|
|
|
|
XCTAssertEqual(subject.goBackwardsImage()?.accessibilityDescription, expectations.expectedBackwardsImage) |
|
|
|
|
XCTAssertEqual(subject.goForwardsImage()?.accessibilityDescription, expectations.expectedForwardsImage) |
|
|
|
|
XCTAssertEqual(subject.resetModernSliderImage()?.accessibilityDescription, expectations.expectedResetSliderImage) |
|
|
|
|
XCTAssertEqual(subject.sharingImage().accessibilityDescription, expectations.expectedSharingImage) |
|
|
|
|
XCTAssertEqual(subject.currentLocationImage().accessibilityDescription, expectations.expectedCurrentLocationImage) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
XCTAssertEqual(subject.sliderKnobColor(), expectations.expectedSliderKnobColor) |
|
|
|
|
XCTAssertEqual(subject.sliderRightColor(), expectations.expectedSliderRightColor) |
|
|
|
|
XCTAssertEqual(subject.mainBackgroundColor(), expectations.expectedBackgroundColor) |
|
|
|
|
XCTAssertEqual(subject.mainTextColor(), expectations.expectedTextColor) |
|
|
|
|
XCTAssertEqual(subject.textBackgroundColor(), expectations.expectedTextBackgroundColor) |
|
|
|
|
XCTAssertEqual(subject.shutdownImage().accessibilityDescription, expectations.expectedShutdownImageName) |
|
|
|
|
XCTAssertEqual(subject.preferenceImage().accessibilityDescription, expectations.expectedPreferenceImageName) |
|
|
|
|
XCTAssertEqual(subject.pinImage().accessibilityDescription, expectations.expectedPinImageName) |
|
|
|
|
XCTAssertEqual(subject.sunriseImage().accessibilityDescription, expectations.expectedSunriseImageName) |
|
|
|
|
XCTAssertEqual(subject.sunsetImage().accessibilityDescription, expectations.expectedSunsetImageName) |
|
|
|
|
XCTAssertEqual(subject.removeImage().accessibilityDescription, expectations.expectedRemoveImageName) |
|
|
|
|
XCTAssertEqual(subject.extraOptionsImage().name(), expectations.expectedExtraOptionsImage) |
|
|
|
|
XCTAssertEqual(subject.menubarOnboardingImage().name(), expectations.expectedMenubarOnboardingImage) |
|
|
|
|
XCTAssertEqual(subject.extraOptionsHighlightedImage().name(), expectations.expectedExtraOptionsHighlightedImage) |
|
|
|
|
XCTAssertEqual(subject.sharingImage().accessibilityDescription, expectations.expectedSharingImage) |
|
|
|
|
XCTAssertEqual(subject.currentLocationImage().accessibilityDescription, expectations.expectedCurrentLocationImage) |
|
|
|
|
XCTAssertEqual(subject.popoverAppearance(), expectations.expectedPopoverApperarance) |
|
|
|
|
XCTAssertEqual(subject.addImage().accessibilityDescription, expectations.expectedAddImage) |
|
|
|
|
XCTAssertEqual(subject.privacyTabImage().accessibilityDescription, expectations.expectedPrivacyTabImage) |
|
|
|
|
XCTAssertEqual(subject.appearanceTabImage().accessibilityDescription, expectations.expectedAppearanceTabImage) |
|
|
|
|
XCTAssertEqual(subject.calendarTabImage().accessibilityDescription, expectations.expectedCalendarTabImage) |
|
|
|
|
XCTAssertEqual(subject.generalTabImage()?.accessibilityDescription, expectations.expectedGeneralTabImage) |
|
|
|
|
XCTAssertEqual(subject.aboutTabImage()?.accessibilityDescription, expectations.expectedAboutTabImage) |
|
|
|
|
XCTAssertEqual(subject.videoCallImage()?.accessibilityDescription, expectations.expectedVideoCallImage) |
|
|
|
|
XCTAssertEqual(subject.filledTrashImage()?.accessibilityDescription, expectations.expectedFilledTrashImage) |
|
|
|
|
XCTAssertEqual(subject.goBackwardsImage()?.accessibilityDescription, expectations.expectedBackwardsImage) |
|
|
|
|
XCTAssertEqual(subject.goForwardsImage()?.accessibilityDescription, expectations.expectedForwardsImage) |
|
|
|
|
XCTAssertEqual(subject.resetModernSliderImage()?.accessibilityDescription, expectations.expectedResetSliderImage) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|