From 91fc6494001c8a7872e6dda353fa2ea6006bca0a Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Sun, 24 Mar 2024 17:20:23 -0400 Subject: [PATCH] Fix UI tests. --- Clocker/ClockerUITests/CopyToClipboardTests.swift | 4 ++-- Clocker/ClockerUITests/FloatingWindowTests.swift | 4 ++-- Clocker/ClockerUITests/OnboardingTests.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Clocker/ClockerUITests/CopyToClipboardTests.swift b/Clocker/ClockerUITests/CopyToClipboardTests.swift index bf4ba7c..3a87c0b 100644 --- a/Clocker/ClockerUITests/CopyToClipboardTests.swift +++ b/Clocker/ClockerUITests/CopyToClipboardTests.swift @@ -64,9 +64,9 @@ class CopyToClipboardTests: XCTestCase { miscTab.click() if modernSliderExists { - app.radioGroups["FutureSlider"].radioButtons["Legacy"].click() + app.radioGroups["FutureSlider"].radioButtons["Hide"].click() } else { - app.radioGroups["FutureSlider"].radioButtons["Modern"].click() + app.radioGroups["FutureSlider"].radioButtons["Show"].click() } app.tapMenubarIcon() diff --git a/Clocker/ClockerUITests/FloatingWindowTests.swift b/Clocker/ClockerUITests/FloatingWindowTests.swift index e4e7209..3670723 100644 --- a/Clocker/ClockerUITests/FloatingWindowTests.swift +++ b/Clocker/ClockerUITests/FloatingWindowTests.swift @@ -117,9 +117,9 @@ class FloatingWindowTests: XCTestCase { app.radioGroups["FutureSlider"].radioButtons["Show"].click() } + // Floating window does not support modern slider. let newFloatingSliderExists = app.sliders["FloatingSlider"].exists - - XCTAssertNotEqual(floatingSlider, newFloatingSliderExists) + XCTAssertFalse(newFloatingSliderExists) } func testHidingMenubarOptions() { diff --git a/Clocker/ClockerUITests/OnboardingTests.swift b/Clocker/ClockerUITests/OnboardingTests.swift index 7f15bee..3a88bc3 100644 --- a/Clocker/ClockerUITests/OnboardingTests.swift +++ b/Clocker/ClockerUITests/OnboardingTests.swift @@ -113,7 +113,7 @@ class OnboardingTests: XCTestCase { let onboardingWindow = app.windows["OnboardingWindow"] 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["Backward"].exists, "Back button was unexpectedly missing")