From f737dee6c6f8cbca9a8544433fdc9f87d5c24158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 15 Sep 2026 11:32:14 +0200 Subject: [PATCH] test(android): read the install-timeout fixture from the helper manifest fixture #2618 removed `installArgs` from `AndroidSnapshotHelperManifest` and updated the shared helper fixture, the packaging script and the parse test, but this file kept its own hand-written manifest literal with the field still in it, which is what `tsc` rejects on main today's tip: an excess property on a type that no longer declares it. A second copy of the manifest is also how that field survived this long. Both tests re-hash the manifest for the APK they write, so the identity fields carry no test intent; they now come from `ANDROID_SNAPSHOT_HELPER_FIXTURE_ARTIFACT` like every other helper test. The one case that still needs a manifest carrying `installArgs` is the parse path that ignores it, and that case spells the key out inline in `snapshot-helper.test.ts`. --- .../__tests__/snapshot-helper-install.test.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/packages/platform-android/src/__tests__/snapshot-helper-install.test.ts b/packages/platform-android/src/__tests__/snapshot-helper-install.test.ts index 6d3c441195..1cdffb11af 100644 --- a/packages/platform-android/src/__tests__/snapshot-helper-install.test.ts +++ b/packages/platform-android/src/__tests__/snapshot-helper-install.test.ts @@ -11,23 +11,12 @@ import { } from '../snapshot-helper-install.ts'; import type { AndroidAdbExecutor, AndroidAdbProvider } from '../adb-executor.ts'; import type { AndroidAdbInstaller } from '../adb-transport.ts'; -import type { AndroidSnapshotHelperManifest } from '../snapshot-helper-types.ts'; +import { ANDROID_SNAPSHOT_HELPER_FIXTURE_ARTIFACT } from './test-utils/android-snapshot-helper.ts'; import { mkdtempForTest } from './test-utils/tmp-dir.ts'; -const manifest: AndroidSnapshotHelperManifest = { - name: 'android-snapshot-helper', - version: '0.13.3', - apkUrl: null, - sha256: 'a'.repeat(64), - packageName: 'com.callstack.agentdevice.snapshothelper', - versionCode: 13003, - instrumentationRunner: 'com.callstack.agentdevice.snapshothelper/.SnapshotInstrumentation', - minSdk: 23, - targetSdk: 36, - outputFormat: 'uiautomator-xml', - statusProtocol: 'android-snapshot-helper-v1', - installArgs: ['install', '-r'], -}; +// Every test here re-hashes the manifest for the APK it writes, so the identity fields come from the +// one helper fixture rather than a second copy that can drift from the manifest type. +const manifest = ANDROID_SNAPSHOT_HELPER_FIXTURE_ARTIFACT.manifest; beforeEach(() => { resetAndroidSnapshotHelperInstallCache();