@@ -23,32 +23,18 @@ final class RenewalBillingUITests: XCTestCase {
2323 screenshot ( " stored-january-date " )
2424
2525 reveal ( " renewal.timezone " ) . tap ( )
26+ XCTAssertTrue ( app . navigationBars [ " Billing timezone " ] . waitForExistence ( timeout : 5 ) , app . debugDescription )
27+ let search = app . searchFields . matching ( NSPredicate ( format : " placeholderValue == %@ " , " Search billing timezones " ) ) . firstMatch
28+ XCTAssertTrue ( search . waitForExistence ( timeout : 5 ) , app . debugDescription )
29+ XCTAssertTrue ( search . isHittable , search . debugDescription )
30+ search . tap ( )
31+ search . typeText ( " UTC " )
2632 let utc = app . buttons [ " UTC " ] . firstMatch
27- // The native menu scrolls to the current selection, so UTC at the
28- // beginning of the IANA list is initially outside its lazy viewport.
29- // Retain the menu's indexed element before scrolling moves that
30- // selection out of view; swiping the app would hit a different layer.
31- let menu = try XCTUnwrap ( app . collectionViews . allElementsBoundByIndex . last ( where : {
32- $0 . buttons [ " America/New_York " ] . exists
33- } ) , app . debugDescription )
34- for _ in 0 ..< 14 {
35- if utc . exists && utc . isHittable { break }
36- // The menu's accessibility frame extends beyond the window.
37- // Drag across its visible viewport instead of using XCTest's
38- // shorter default swipe, which stopped among the Africa entries.
39- let frame = menu . frame
40- let viewport = frame . intersection ( app . windows . firstMatch . frame )
41- XCTAssertFalse ( viewport . isEmpty , menu . debugDescription )
42- let origin = menu . coordinate ( withNormalizedOffset : . zero )
43- let start = origin . withOffset ( CGVector ( dx : viewport . midX - frame . minX ,
44- dy : viewport . minY + viewport . height * 0.1 - frame . minY ) )
45- let end = origin . withOffset ( CGVector ( dx : viewport . midX - frame . minX ,
46- dy : viewport . minY + viewport . height * 0.9 - frame . minY ) )
47- start . press ( forDuration : 0.05 , thenDragTo : end )
48- }
4933 XCTAssertTrue ( utc . waitForExistence ( timeout : 5 ) , app . debugDescription )
5034 XCTAssertTrue ( utc . isHittable , app . debugDescription )
35+ screenshot ( " timezone-search-utc " )
5136 utc . tap ( )
37+ XCTAssertTrue ( app . navigationBars [ " Edit Server " ] . waitForExistence ( timeout : 5 ) , app . debugDescription )
5238 assertText ( " renewal.timezone " , contains : " UTC " )
5339 assertDate ( " Jan 31, 2026 " )
5440 screenshot ( " utc-picker-selected-date-preserved " )
0 commit comments