Files
LensApp/e2e/home.e2e.ts
Rakshit Kumar Singh e61ca8a629 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
2026-04-18 22:32:40 +05:30

29 lines
809 B
TypeScript

import {device, element, by, expect as detoxExpect} from 'detox';
describe('Home Screen', () => {
beforeAll(async () => {
await device.launchApp({newInstance: true});
});
beforeEach(async () => {
await device.reloadReactNative();
});
it('shows the app title', async () => {
await detoxExpect(element(by.text('Lens'))).toBeVisible();
});
it('shows empty state when no documents exist', async () => {
await detoxExpect(element(by.id('empty-state'))).toBeVisible();
await detoxExpect(element(by.text('No scans yet'))).toBeVisible();
});
it('shows the scan FAB', async () => {
await detoxExpect(element(by.id('scan-fab'))).toBeVisible();
});
it('scan FAB label reads Scan', async () => {
await detoxExpect(element(by.text('Scan'))).toBeVisible();
});
});