From 6c2bf69589b01bb001cd7a87184c1657be5ef350 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:07:04 +0000 Subject: [PATCH 01/10] CC-219: diagnostic - name the on-screen controls when the gallery contract fails --- .../WidgetHomeScreenProbeUITests.swift | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift index 69952543..fdb39bb3 100644 --- a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift +++ b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift @@ -33,13 +33,13 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { wallpaper.press(forDuration: 2.0) guard let edit = waitForControl(springboard, editLabel, timeout: 8) else { - XCTFail("unsupported-path: Edit control missing after long-press") + XCTFail("unsupported-path: Edit control missing after long-press; on-screen: \(elementInventory(springboard))") return } tap(edit) guard let addWidget = waitForControl(springboard, addWidgetLabel, timeout: 8) else { - XCTFail("unsupported-path: Add Widget control missing") + XCTFail("unsupported-path: Add Widget control missing; on-screen: \(elementInventory(springboard))") return } tap(addWidget) @@ -94,6 +94,32 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { add(attachment) } + /// Diagnostic inventory for a contract failure: the labeled elements + /// SpringBoard is presenting right now, so the failure line names what + /// was actually on screen instead of only what was missing. + private func elementInventory(_ app: XCUIApplication) -> String { + let kinds: [(String, XCUIElementType)] = [ + ("button", .button), + ("menuItem", .menuItem), + ("cell", .cell), + ("icon", .icon), + ("staticText", .staticText), + ("other", .other), + ] + var entries: [String] = [] + for (name, type) in kinds { + for element in app.descendants(matching: type).allElementsBoundByIndex { + if !element.label.isEmpty { + entries.append("\(name)=\(element.label)") + } + if entries.count >= 150 { + return entries.joined(separator: " | ") + } + } + } + return entries.isEmpty ? "" : entries.joined(separator: " | ") + } + /// Search lists the app, then the widget. Tap the app row only when the /// widget name is not on screen yet, then require the widget itself. /// Rows are cells or buttons. The search field's typed text is not a row. From 4fdeb53734b3c6f248db6bc76c6ad16623db4808 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:22:58 +0000 Subject: [PATCH 02/10] CC-219: diagnostic - use the current ElementType spelling so the probe compiles on Xcode 26 --- .../UITests/WidgetHomeScreenProbeUITests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift index fdb39bb3..bd4e09db 100644 --- a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift +++ b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift @@ -98,7 +98,7 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { /// SpringBoard is presenting right now, so the failure line names what /// was actually on screen instead of only what was missing. private func elementInventory(_ app: XCUIApplication) -> String { - let kinds: [(String, XCUIElementType)] = [ + let kinds: [(String, XCUIElement.ElementType)] = [ ("button", .button), ("menuItem", .menuItem), ("cell", .cell), From 22304f67833dc729a2ab5494e36ac2e4087a0e81 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:46:15 +0000 Subject: [PATCH 03/10] [CC, MA] WidgetKit gallery contract: decline the pending notification-permission alert before the long-press --- .../WidgetHomeScreenProbeUITests.swift | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift index bd4e09db..1f45678a 100644 --- a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift +++ b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift @@ -1,10 +1,15 @@ import XCTest -/// Pinned iOS 18–27 home-screen gallery contract: long-press empty wallpaper, -/// Edit, Add Widget, search CodeCaps, add AI Subscription Overview, Done. +/// Pinned iOS 18–27 home-screen gallery contract: decline the companion's +/// pending notification-permission alert, long-press empty wallpaper, Edit, +/// Add Widget, search CodeCaps, add AI Subscription Overview, Done. /// A missing control fails closed with an `unsupported-path:` message. The /// test does not try a second gesture and does not retry. final class WidgetHomeScreenProbeUITests: XCTestCase { + /// SpringBoard labels the notification-permission decline button with a + /// U+2019 apostrophe; the escape keeps the label byte-exact. + private let doNotAllowLabel = "Don\u{2019}t Allow" + private let allowLabel = "Allow" private let editLabel = "Edit" private let addWidgetLabel = "Add Widget" private let doneLabel = "Done" @@ -29,6 +34,11 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") springboard.activate() + guard dismissPermissionAlert(springboard) else { + XCTFail("unsupported-path: notification permission alert could not be dismissed; on-screen: \(elementInventory(springboard))") + return + } + let wallpaper = springboard.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.70)) wallpaper.press(forDuration: 2.0) @@ -94,6 +104,31 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { add(attachment) } + /// The companion asks for notification permission when its model first + /// loads: two alert kinds ship enabled with notifications on, and the + /// model's startup sync assigns its preferences, which makes the model + /// request authorization. On a fresh simulator that system alert is + /// still sitting on SpringBoard when this test starts. The alert is + /// modal — while it is up, the long-press never reaches the Home Screen + /// and no Edit control exists — so the contract declines it first. The + /// probe never grants a permission on the owner's behalf, and the widget + /// render does not need notifications. Returns false when an alert is + /// present but will not dismiss. + private func dismissPermissionAlert(_ app: XCUIApplication) -> Bool { + guard let decline = waitForControl(app, doNotAllowLabel, timeout: 5) else { + return true + } + tap(decline) + let deadline = Date().addingTimeInterval(5) + repeat { + if existingControl(app, doNotAllowLabel) == nil && existingControl(app, allowLabel) == nil { + return true + } + RunLoop.current.run(until: Date().addingTimeInterval(0.2)) + } while Date() < deadline + return existingControl(app, doNotAllowLabel) == nil && existingControl(app, allowLabel) == nil + } + /// Diagnostic inventory for a contract failure: the labeled elements /// SpringBoard is presenting right now, so the failure line names what /// was actually on screen instead of only what was missing. From cd33e7e971d596a3331cbccf419892df85ec7305 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:46:21 +0000 Subject: [PATCH 04/10] [CC, MA] Probe tests: pin the permission-alert dismissal contract and inventory refusals --- scripts/widget_homescreen_probe_test.py | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/scripts/widget_homescreen_probe_test.py b/scripts/widget_homescreen_probe_test.py index 3af7e26d..1880cdb8 100644 --- a/scripts/widget_homescreen_probe_test.py +++ b/scripts/widget_homescreen_probe_test.py @@ -363,6 +363,19 @@ def test_a_real_gallery_mismatch_stays_a_refusal(self): self.assertEqual(outcome_code(outcome), EXIT_UNSUPPORTED) self.assertIn("Edit control missing", message) + def test_gallery_failure_with_on_screen_inventory_stays_a_refusal(self): + log = ( + "error: -[WidgetHomeScreenProbeUITests testHomeScreenRendersSeededQuota] : " + "failed - unsupported-path: Edit control missing after long-press; " + "on-screen: button=Allow | staticText=CodeCaps\n" + "** TEST FAILED **\n" + ) + outcome, message = interpret_log(log, 12000) + self.assertEqual(outcome, Outcome.UNSUPPORTED) + self.assertEqual(outcome_code(outcome), EXIT_UNSUPPORTED) + self.assertIn("Edit control missing", message) + self.assertIn("on-screen: button=Allow", message) + def test_success_without_a_screenshot_is_a_failure(self): log = ( "Test Case '-[WidgetHomeScreenProbeUITests testHomeScreenRendersSeededQuota]' started.\n" @@ -807,6 +820,25 @@ def test_swift_oracle_matches_the_seed_and_the_widget_name(self): self.assertIn('configurationDisplayName("AI Subscription Overview")', bundle) self.assertIn("AI Subscription Overview", swift) + def test_swift_gallery_contract_declines_the_permission_alert_first(self): + swift = (PROBE_SOURCES / "UITests" / "WidgetHomeScreenProbeUITests.swift").read_text(encoding="utf-8") + # The decline button's label carries a U+2019 apostrophe, written in + # the Swift source as an escape so the label stays byte-exact. + self.assertIn('doNotAllowLabel = "Don\\u{2019}t Allow"', swift) + self.assertIn("dismissPermissionAlert", swift) + # The alert is modal: the dismissal must run before the long-press, + # or the press never reaches the Home Screen and no Edit control + # exists. An alert that will not dismiss stays an exit-78 refusal. + self.assertLess( + swift.index("dismissPermissionAlert(springboard)"), + swift.index("press(forDuration: 2.0)"), + ) + self.assertIn( + "unsupported-path: notification permission alert could not be dismissed", swift) + # A contract failure names what SpringBoard actually presented. + self.assertIn("elementInventory", swift) + self.assertIn("on-screen:", swift) + def test_off_device_widget_probe_still_compiles_the_real_views(self): text = (ROOT / "scripts/test-widget-ui-native.sh").read_text(encoding="utf-8") self.assertIn("swiftc -parse-as-library", text) From b495deec324c347d369a880612f220be905fe3f4 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:46:28 +0000 Subject: [PATCH 05/10] [CC, MA] WIDGETS.md: document the permission-alert step in the gallery contract --- docs/WIDGETS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/WIDGETS.md b/docs/WIDGETS.md index 1ac2165b..28c5b548 100644 --- a/docs/WIDGETS.md +++ b/docs/WIDGETS.md @@ -54,7 +54,7 @@ These commands verify signed entitlement declarations. They do not by themselve `scripts/test-widget-ui-native.sh` compiles the widget views off-device.  It does not place a widget on the iOS Home Screen.  `scripts/test-widget-homescreen.sh` is that check (CC-219). -On a Mac with Xcode, the script creates a disposable iPhone simulator, builds the companion, and refuses to start when any simulator is already booted.  It installs the app, reboots once so WidgetKit can register the extension, and writes a fresh `quota-windows.json` into the App Group container and the app data container.  `occurredAt` is the current time and every `resetAt` is in the future.  A scratch XCUITest host long-presses empty wallpaper, taps Edit, taps Add Widget, searches for CodeCaps, and adds AI Subscription Overview.  `simctl io` writes a PNG of that Home Screen.  The test passes only when SpringBoard's accessibility tree shows the seeded GitHub Copilot reading at 37%, which the gallery placeholders do not render. +On a Mac with Xcode, the script creates a disposable iPhone simulator, builds the companion, and refuses to start when any simulator is already booted.  It installs the app, reboots once so WidgetKit can register the extension, and writes a fresh `quota-windows.json` into the App Group container and the app data container.  `occurredAt` is the current time and every `resetAt` is in the future.  A scratch XCUITest host first declines the companion's pending notification-permission alert — the model asks on first load, and the modal alert would swallow the long-press — then long-presses empty wallpaper, taps Edit, taps Add Widget, searches for CodeCaps, and adds AI Subscription Overview.  `simctl io` writes a PNG of that Home Screen.  The test passes only when SpringBoard's accessibility tree shows the seeded GitHub Copilot reading at 37%, which the gallery placeholders do not render. The script does not open Simulator.app. @@ -64,7 +64,7 @@ The command exits 78 with an `unsupported-path:` line, and that result is not a - A simulator is already booted. - No iOS 18 through 27 runtime is installed. - The App Group container cannot be resolved after install. When `simctl` cannot report the container but the companion's launch hook proves `containerURL(forSecurityApplicationGroupIdentifier:)` resolved a path that exists inside the simulator's own App Group area, the script uses that verified companion-reported path and prints a `widget-homescreen: simctl never reported the App Group container` line; the exit-78 refusal still applies when the companion reports nil, writes no marker, or names a path that fails verification. -- The pinned gallery controls (Edit, Add Widget, the search field, CodeCaps, Done) are absent. +- The pinned gallery controls (Edit, Add Widget, the search field, CodeCaps, Done) are absent, or the permission alert will not dismiss. A gallery that does not match that contract fails closed.  The script does not try a second path and does not retry. From e26b5dbd12256e2a06ae7c7aadc80d5089ec669e Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 04:08:04 +0000 Subject: [PATCH 06/10] [CC, MA] Probe diagnostics: name the on-screen elements in every gallery-step refusal --- .../UITests/WidgetHomeScreenProbeUITests.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift index 1f45678a..b6073ee6 100644 --- a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift +++ b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift @@ -56,32 +56,32 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { let search = springboard.searchFields.firstMatch guard search.waitForExistence(timeout: 8) else { - XCTFail("unsupported-path: widget gallery search field missing") + XCTFail("unsupported-path: widget gallery search field missing; on-screen: \(elementInventory(springboard))") return } tap(search) search.typeText(appLabel) guard let widget = waitForWidgetResult(springboard) else { - XCTFail("unsupported-path: CodeCaps widget missing from gallery search") + XCTFail("unsupported-path: CodeCaps widget missing from gallery search; on-screen: \(elementInventory(springboard))") return } tap(widget) guard let confirm = waitForControl(springboard, addWidgetLabel, timeout: 8) else { - XCTFail("unsupported-path: gallery confirm Add Widget missing") + XCTFail("unsupported-path: gallery confirm Add Widget missing; on-screen: \(elementInventory(springboard))") return } tap(confirm) guard let done = waitForControl(springboard, doneLabel, timeout: 8) else { - XCTFail("unsupported-path: Done control missing after add") + XCTFail("unsupported-path: Done control missing after add; on-screen: \(elementInventory(springboard))") return } tap(done) if springboard.searchFields.firstMatch.exists { - XCTFail("unsupported-path: widget gallery search field still present after add") + XCTFail("unsupported-path: widget gallery search field still present after add; on-screen: \(elementInventory(springboard))") return } From dd0218b9fc679dea3397552eb144bc93decfef25 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 04:27:54 +0000 Subject: [PATCH 07/10] [CC, MA] WidgetKit gallery contract: match the widget entry SpringBoard actually presents --- .../WidgetHomeScreenProbeUITests.swift | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift index b6073ee6..d309a86c 100644 --- a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift +++ b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift @@ -12,6 +12,8 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { private let allowLabel = "Allow" private let editLabel = "Edit" private let addWidgetLabel = "Add Widget" + /// The widget page's confirm button is labeled with a leading space. + private let galleryAddWidgetLabel = " Add Widget" private let doneLabel = "Done" private let appLabel = "CodeCaps" private let widgetLabel = "AI Subscription Overview" @@ -68,7 +70,8 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { } tap(widget) - guard let confirm = waitForControl(springboard, addWidgetLabel, timeout: 8) else { + guard let confirm = waitForControl(springboard, addWidgetLabel, timeout: 8) + ?? waitForControl(springboard, galleryAddWidgetLabel, timeout: 3) else { XCTFail("unsupported-path: gallery confirm Add Widget missing; on-screen: \(elementInventory(springboard))") return } @@ -155,18 +158,29 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { return entries.isEmpty ? "" : entries.joined(separator: " | ") } - /// Search lists the app, then the widget. Tap the app row only when the - /// widget name is not on screen yet, then require the widget itself. - /// Rows are cells or buttons. The search field's typed text is not a row. + /// Search lists the app, and can also list the widget itself — as a + /// button carrying the compound "CodeCaps, AI Subscription Overview" + /// label, never the bare widget name. The app's gallery page presents + /// that same compound button for the widget preview, with the widget + /// name as a static text and the description underneath. Match what + /// SpringBoard actually presents: the compound button in the results, + /// or the app row first and then the widget on its page. private func waitForWidgetResult(_ app: XCUIApplication) -> XCUIElement? { - if let widget = waitForResult(app, widgetLabel, timeout: 8) { + let compoundLabel = "\(appLabel), \(widgetLabel)" + if let entry = waitForResult(app, compoundLabel, timeout: 8) { + return entry + } + if let widget = waitForResult(app, widgetLabel, timeout: 2) { return widget } guard let appRow = waitForResult(app, appLabel, timeout: 2) else { return nil } tap(appRow) - return waitForResult(app, widgetLabel, timeout: 8) + if let widget = waitForResult(app, compoundLabel, timeout: 8) { + return widget + } + return waitForControl(app, widgetLabel, timeout: 3) } private func waitForResult(_ app: XCUIApplication, _ label: String, timeout: TimeInterval) -> XCUIElement? { From 666667274d99ca9ae7d0a67993ce040d94dbe7f0 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 04:28:00 +0000 Subject: [PATCH 08/10] [CC, MA] Probe tests: pin the compound widget label and the spaced gallery add label --- scripts/widget_homescreen_probe_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/widget_homescreen_probe_test.py b/scripts/widget_homescreen_probe_test.py index 1880cdb8..271f71ca 100644 --- a/scripts/widget_homescreen_probe_test.py +++ b/scripts/widget_homescreen_probe_test.py @@ -838,6 +838,12 @@ def test_swift_gallery_contract_declines_the_permission_alert_first(self): # A contract failure names what SpringBoard actually presented. self.assertIn("elementInventory", swift) self.assertIn("on-screen:", swift) + # The gallery never presents the bare widget name as a result row: + # the widget entry is a button with the compound "App, Widget" + # label, and the widget page's confirm button carries a leading + # space. Both presented forms are pinned. + self.assertIn('galleryAddWidgetLabel = " Add Widget"', swift) + self.assertIn('"\\(appLabel), \\(widgetLabel)"', swift) def test_off_device_widget_probe_still_compiles_the_real_views(self): text = (ROOT / "scripts/test-widget-ui-native.sh").read_text(encoding="utf-8") From d400d572af8d4b398aa11095677535f6e469d905 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 04:59:06 +0000 Subject: [PATCH 09/10] [CC, MA] Kody review fixes: gate the no-alert verdict on both buttons, tappable-only widget fallback, bounded failure inventory --- .../WidgetHomeScreenProbeUITests.swift | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift index d309a86c..c21dc556 100644 --- a/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift +++ b/ios/WidgetHomeScreenProbe/UITests/WidgetHomeScreenProbeUITests.swift @@ -119,7 +119,9 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { /// present but will not dismiss. private func dismissPermissionAlert(_ app: XCUIApplication) -> Bool { guard let decline = waitForControl(app, doNotAllowLabel, timeout: 5) else { - return true + // No decline button is not yet proof of no alert: the modal is + // absent only when neither of its buttons is on screen. + return existingControl(app, allowLabel) == nil } tap(decline) let deadline = Date().addingTimeInterval(5) @@ -144,15 +146,21 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { ("staticText", .staticText), ("other", .other), ] + let labeled = NSPredicate(format: "label != ''") var entries: [String] = [] for (name, type) in kinds { - for element in app.descendants(matching: type).allElementsBoundByIndex { - if !element.label.isEmpty { - entries.append("\(name)=\(element.label)") - } + let query = app.descendants(matching: type).matching(labeled) + for index in 0..<25 { if entries.count >= 150 { return entries.joined(separator: " | ") } + let element = query.element(boundBy: index) + if !element.exists { + break + } + if !element.label.isEmpty { + entries.append("\(name)=\(element.label)") + } } } return entries.isEmpty ? "" : entries.joined(separator: " | ") @@ -180,7 +188,7 @@ final class WidgetHomeScreenProbeUITests: XCTestCase { if let widget = waitForResult(app, compoundLabel, timeout: 8) { return widget } - return waitForControl(app, widgetLabel, timeout: 3) + return waitForResult(app, widgetLabel, timeout: 3) } private func waitForResult(_ app: XCUIApplication, _ label: String, timeout: TimeInterval) -> XCUIElement? { From 712b9fe8625dd32228528fa2f62ae30dd54ba354 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 04:59:12 +0000 Subject: [PATCH 10/10] [CC, MA] Probe tests: pin the Kody review dispositions for the gallery contract --- scripts/widget_homescreen_probe_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/widget_homescreen_probe_test.py b/scripts/widget_homescreen_probe_test.py index 271f71ca..c2c18823 100644 --- a/scripts/widget_homescreen_probe_test.py +++ b/scripts/widget_homescreen_probe_test.py @@ -844,6 +844,11 @@ def test_swift_gallery_contract_declines_the_permission_alert_first(self): # space. Both presented forms are pinned. self.assertIn('galleryAddWidgetLabel = " Add Widget"', swift) self.assertIn('"\\(appLabel), \\(widgetLabel)"', swift) + # The no-alert verdict requires both alert buttons absent, and the + # widget fallback returns a tappable row (cells/buttons), never a + # static text. + self.assertIn("existingControl(app, allowLabel) == nil", swift) + self.assertIn("return waitForResult(app, widgetLabel, timeout: 3)", swift) def test_off_device_widget_probe_still_compiles_the_real_views(self): text = (ROOT / "scripts/test-widget-ui-native.sh").read_text(encoding="utf-8")