@craft-native/ios 0.0.483 → 0.0.484

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft-native/ios",
3
- "version": "0.0.483",
3
+ "version": "0.0.484",
4
4
  "homepage": "https://github.com/craft-native/craft/tree/main/packages/ios#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -796,9 +796,16 @@ final class DriverTests: XCTestCase {
796
796
  // A system prompt over the app ("Save Password?" → Not Now), wherever iOS shows it.
797
797
  let label = arg.isEmpty ? "Not Now" : arg
798
798
  let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
799
- // The app's own alert or sheet first (its button can share a
800
- // label with the control behind it), then the app, then iOS.
801
- let candidates = { self.presentedScopes().map { $0.buttons[label] } + [springboard.buttons[label]] }
799
+ // Optional prompt dismissal must never activate a same-named
800
+ // control on the screen behind it. Resolve only presented dialogs
801
+ // and system UI, binding each match by index before tapping: a
802
+ // password sheet can arrive between query construction and use.
803
+ let candidates = {
804
+ let dialogs = self.presentedScopes().filter { $0.elementType == .alert || $0.elementType == .sheet }
805
+ return (dialogs + [springboard]).flatMap { scope in
806
+ scope.buttons.matching(NSPredicate(format: "label == %@", label)).allElementsBoundByIndex
807
+ }
808
+ }
802
809
  let end = Date().addingTimeInterval(6)
803
810
  // A tap is not a dismissal. iOS 26 draws "Save Password?" as a
804
811
  // sheet that is in the tree, and hittable, while it still slides