Skip to content

cleanup: relocate Apple unit tests out of src/platforms/ios/__tests__ #980

Description

@thymikee

After the #968 Apple consolidation, 20 test entries still live in src/platforms/ios/__tests__/ while the code they test moved to src/platforms/apple/. Relocate them so tests sit beside their source.

Pure relocations (18 files — import only ../../apple/core/..., a few also ../../apple/os/macos/...)

apple-runner-platform.test.ts, debug-symbols.test.ts, devices.test.ts, launch-diagnostics.test.ts, perf.test.ts, plist.test.ts, runner-client.test.ts, runner-command-retry.test.ts, runner-command-traits.test.ts, runner-icon.test.ts, runner-provider.test.ts, runner-sequence.test.ts, runner-session.test.ts, runner-transport.test.ts, runner-xctestrun.test.ts, simctl.test.ts, tool-provider.test.ts, xml.test.tssrc/platforms/apple/core/__tests__/ (and apple/os/macos/__tests__/ for the macOS ones), updating the relative imports.

Needs splitting / special handling

  • index.test.ts — MIXED: apple/core assertions (apps/screenshot/simulator/config/devicectl/runner-client + macos helper) plus the iosRunnerOverrides block (:200-449: synthesized taps/drag, tvOS remote-press, macOS desktop scroll) that covers ../interactions.ts. Split: apple/core asserts → apple/, the iosRunnerOverrides tests → wherever interactions.ts lands (see d.1 relocation).
  • recording-scripts.test.ts — ORPHANED here: imports ../../../recording/overlay.ts and typechecks Swift under ios-runner/.../RecordingScripts/. Move near src/recording/.
  • macos-helper-test-utils.ts — test util (withMockedMacOsHelper), used only by index.test.ts:64; moves with the macOS-helper tests.

Leave src/platforms/ios/interactions.ts in place until d.1 (it is the Apple interaction leaf, not iOS-only). Pure mechanical move — guarded by the unit suite. Note docs/ios-runner-protocol-optimizations.md:31-32 references these test paths and should be updated when they move.


Part of #972 (Phase 3 — Apple PlatformPlugin).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions