import XCTest /// The manual rating entry point is the only path a willing user can always take — StoreKit's /// dialog may be suppressed by the OS. If this row disappears, ratings stop entirely. final class SettingsRateAppUITests: XCTestCase { override func setUpWithError() throws { try super.setUpWithError() continueAfterFailure = false } @MainActor func testSettingsOffersARateAppRow() throws { let app = XCUIApplication() app.launchArguments = [ "--uitest-reset-data", "--uitest-sample-data", "-AppleLanguages", "(en)", "-AppleLocale", "en_US", ] app.launch() let settingsButton = app.buttons["systems-settings"] XCTAssertTrue(settingsButton.waitForExistence(timeout: 15)) settingsButton.tap() let rateRow = app.buttons["settings-rate-app"] XCTAssertTrue( rateRow.waitForExistence(timeout: 10), "Settings no longer offers a way to rate the app" ) XCTAssertTrue( rateRow.label.contains("Rate Cable"), "Rate row shows \"\(rateRow.label)\" instead of the localized title" ) } }