From 106cdfa24ccc673f84471c471095072977db4470 Mon Sep 17 00:00:00 2001 From: gmegidish Date: Fri, 12 Jun 2026 13:28:23 +0200 Subject: [PATCH] feat: launch-app-with-activity test --- mobilewright.config.ts | 2 ++ tests/android/reset-counter.test.ts | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/android/reset-counter.test.ts diff --git a/mobilewright.config.ts b/mobilewright.config.ts index b78443a..fed0b45 100644 --- a/mobilewright.config.ts +++ b/mobilewright.config.ts @@ -14,6 +14,7 @@ const config: MobilewrightConfig = { projects: [ { name: 'ios', + testIgnore: 'tests/android/**', use: { platform: 'ios', installApps: 'ios/Playground-dev.zip', @@ -21,6 +22,7 @@ const config: MobilewrightConfig = { }, { name: 'android', + testIgnore: 'tests/ios/**', use: { platform: 'android', installApps: 'android/Playground-dev.apk', diff --git a/tests/android/reset-counter.test.ts b/tests/android/reset-counter.test.ts new file mode 100644 index 0000000..4249f3e --- /dev/null +++ b/tests/android/reset-counter.test.ts @@ -0,0 +1,9 @@ +import { test, expect } from '@mobilewright/test'; + +test('launch app with custom activity', async ({ device, screen }) => { + await device.terminateApp(bundleId!).catch(() => {}); + await device.launchApp(bundleId!, { + activity: '.BasicUIActivity', + }); + await expect(screen.getByText('RESET COUNTER')).toBeVisible(); +});