enulator test (#1)

* enulator test

* enulator fix

* fix adb name

* fix path for detox

* fix bundeling

* fix api

* fix path

* fix path

* path

* path

* path

* path

* fix: start Metro before emulator-runner to avoid pipe block

* add bare-minimum e2e workflow using release build (no Metro)

* fix: use debug instrumentation APK against release app build

* fix: add Detox androidTest dep and testInstrumentationRunner, use debug build

* fix: add version to detox androidTestImplementation

* fix: add Detox local Maven repo to allprojects

* fix: remove androidTestImplementation detox, not needed with auto-linking

* fix: add androidx.test:runner to provide AndroidJUnitRunner in test APK

* fix: add proper Detox test class and dependency with exclusiveContent

* fix: correct Detox maven coordinate to com.wix:detox

* fix: override Detox minSdk 24 requirement for androidTest

* remove viewer.e2e.ts, requires launch args bridge not yet wired up

* cleanup: remove E2E from build-android workflow, revert release detox config

* update github action

* enable ABI splits for smaller per-arch release APKs

* fix: move abiCodes into closure scope

* fix: only split release builds, keep universal debug APK for E2E
This commit is contained in:
2026-04-18 22:32:40 +05:30
committed by GitHub
parent ab38f47852
commit e61ca8a629
17 changed files with 3400 additions and 58 deletions

20
App.tsx
View File

@@ -1,4 +1,4 @@
import React, {useState, useCallback} from 'react';
import React, {useState, useCallback, useEffect} from 'react';
import {Alert} from 'react-native';
import HomeScreen from './src/screens/HomeScreen';
import ScanScreen from './src/screens/ScanScreen';
@@ -14,6 +14,24 @@ export default function App() {
useDocumentStore();
const [screen, setScreen] = useState<Screen>('home');
// Seed a fake document when launched with detoxSeedDocument=1 (E2E only)
useEffect(() => {
if (__DEV__ || process.env.DETOX_SEED) {
const args = (global as any).__detox_launch_args ?? {};
if (args.detoxSeedDocument === '1') {
createDocument([
{
id: 'seed-page-1',
uri: 'https://via.placeholder.com/600x800.jpg',
width: 600,
height: 800,
},
]);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const [pendingPages, setPendingPages] = useState<ScannedPage[]>([]);
const [viewingDoc, setViewingDoc] = useState<ScannedDocument | null>(null);