Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Fix: add missing simulator QA harness types so the app compiles#117

Open
justanotheratom wants to merge 1 commit into
mainfrom
fix/simulator-qa-harness-types
Open

Fix: add missing simulator QA harness types so the app compiles#117
justanotheratom wants to merge 1 commit into
mainfrom
fix/simulator-qa-harness-types

Conversation

@justanotheratom
Copy link
Copy Markdown
Collaborator

Problem

The Maestro simulator test harness (PRs #114#116) references three types that were never committed, so the IngrediCheck app target currently fails to build on main:

  • DebugScanQAMode (.isEnabled, .presets) — referenced by SplashScreen, HomeView, ScanCameraView, and DebugBarcodeInjectorSheet
  • AppRuntimePolicy (.disablesAnalytics, .skipsDeviceRegistration, .usesLocalUITestAuth) — referenced by AuthController and AnalyticsService

The README for the Maestro suite even lists "the app branch containing DebugScanQAMode" as a prerequisite, but the type was never landed.

Fix

Adds both types to IngrediCheck/Testing/UITestHarness.swift (alongside the existing UITestHarness), with behavior reconstructed from their call sites:

  • DebugScanQAMode mirrors UITestHarness's --debug-scan-qa launch-argument parsing (simulator-only) and exposes the barcode-injector presets. Preset labels match exactly what the scan flows tap ("Coca-Cola 12 oz", "Invalid") and map to the barcodes seeded in UITestFixtures.makeScans().
  • AppRuntimePolicy centralizes the simulator-isolation switches: suppress analytics and backend device registration under any automated run, and gate the local fake-session path to the fully-mocked UITestHarness flows.

Verification

Built for the iOS 17 simulator and ran the full 63-flow Maestro suite (.maestro/flows):

  • 61 / 63 pass, including all scan/* injector flows.
  • The 2 remaining failures (settings/10_sign_out_confirm, settings/12_delete_account_dialog) are pre-existing and unrelated to this change: after sign-out the app lands on WelcomeView instead of presenting sign_in_sheet, because the onChange(of: authController.signInState) handler in SplashScreen.swift is commented out. Tracked separately.

Note: the suite was run with a placeholder Config.swift (gitignored). The mocked UITestHarness flows don't need real backend credentials.

🤖 Generated with Claude Code

The Maestro simulator harness (#114#116) references three types that were
never committed, so the IngrediCheck target fails to build on main:

  - DebugScanQAMode (.isEnabled, .presets) — used by SplashScreen, HomeView,
    ScanCameraView, and DebugBarcodeInjectorSheet
  - AppRuntimePolicy (.disablesAnalytics, .skipsDeviceRegistration,
    .usesLocalUITestAuth) — used by AuthController and AnalyticsService

This adds both to IngrediCheck/Testing/UITestHarness.swift, alongside the
existing UITestHarness, with behavior reconstructed from their call sites:

  - DebugScanQAMode mirrors UITestHarness's --debug-scan-qa launch-arg parsing
    (simulator-only) and exposes the barcode injector presets. Preset labels
    match what the scan flows tap ("Coca-Cola 12 oz", "Invalid") and map to the
    barcodes seeded in UITestFixtures.makeScans().
  - AppRuntimePolicy centralizes the simulator-isolation switches: suppress
    analytics and backend device registration under any automated run, and gate
    the local fake-session path to the fully-mocked UITestHarness flows.

With this, the project builds and the full 63-flow Maestro suite runs; 61 pass.
(The two settings sign-out/delete flows still fail because the post-sign-out
SplashScreen signInState handler is commented out — tracked separately.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant