Browse Source

Fix UI tests.

master
Abhishek Banthia 9 months ago
parent
commit
91fc649400
  1. 4
      Clocker/ClockerUITests/CopyToClipboardTests.swift
  2. 4
      Clocker/ClockerUITests/FloatingWindowTests.swift
  3. 2
      Clocker/ClockerUITests/OnboardingTests.swift

4
Clocker/ClockerUITests/CopyToClipboardTests.swift

@ -64,9 +64,9 @@ class CopyToClipboardTests: XCTestCase {
miscTab.click() miscTab.click()
if modernSliderExists { if modernSliderExists {
app.radioGroups["FutureSlider"].radioButtons["Legacy"].click() app.radioGroups["FutureSlider"].radioButtons["Hide"].click()
} else { } else {
app.radioGroups["FutureSlider"].radioButtons["Modern"].click() app.radioGroups["FutureSlider"].radioButtons["Show"].click()
} }
app.tapMenubarIcon() app.tapMenubarIcon()

4
Clocker/ClockerUITests/FloatingWindowTests.swift

@ -117,9 +117,9 @@ class FloatingWindowTests: XCTestCase {
app.radioGroups["FutureSlider"].radioButtons["Show"].click() app.radioGroups["FutureSlider"].radioButtons["Show"].click()
} }
// Floating window does not support modern slider.
let newFloatingSliderExists = app.sliders["FloatingSlider"].exists let newFloatingSliderExists = app.sliders["FloatingSlider"].exists
XCTAssertFalse(newFloatingSliderExists)
XCTAssertNotEqual(floatingSlider, newFloatingSliderExists)
} }
func testHidingMenubarOptions() { func testHidingMenubarOptions() {

2
Clocker/ClockerUITests/OnboardingTests.swift

@ -113,7 +113,7 @@ class OnboardingTests: XCTestCase {
let onboardingWindow = app.windows["OnboardingWindow"] let onboardingWindow = app.windows["OnboardingWindow"]
XCTAssertTrue(onboardingWindow.staticTexts["Permissions".localizedString()].exists, "Header label's static text was unexpectedly wrong.") XCTAssertTrue(onboardingWindow.staticTexts["Permissions".localizedString()].exists, "Header label's static text was unexpectedly wrong.")
XCTAssertTrue(onboardingWindow.staticTexts["Later Config Description".localizedString()].exists, "Onboarding Info label's static text was unexpectedly wrong.") XCTAssertTrue(onboardingWindow.staticTexts["Your data doesn't leave your device 🔐"].exists, "Onboarding Info label's static text was unexpectedly wrong.")
XCTAssertTrue(onboardingWindow.buttons["Forward"].title == "Continue".localizedString(), "Forward button title's was unexpectedly wrong") XCTAssertTrue(onboardingWindow.buttons["Forward"].title == "Continue".localizedString(), "Forward button title's was unexpectedly wrong")
XCTAssertTrue(onboardingWindow.buttons["Backward"].exists, "Back button was unexpectedly missing") XCTAssertTrue(onboardingWindow.buttons["Backward"].exists, "Back button was unexpectedly missing")

Loading…
Cancel
Save