Skip to content

Commit

Permalink
Merge pull request Expensify#36466 from ruben-rebelo/ts-migration/e2e…
Browse files Browse the repository at this point in the history
…-kill-app
  • Loading branch information
blimpich authored Feb 22, 2024
2 parents 8c17a70 + 15c8165 commit 80e9c2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/utils/killApp.js → tests/e2e/utils/killApp.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import config from '../config';
import execAsync from './execAsync';

export default function (platform = 'android', packageName = config.APP_PACKAGE) {
const killApp = function (platform = 'android', packageName = config.MAIN_APP_PACKAGE): Promise<void> {
if (platform !== 'android') {
throw new Error(`killApp() missing implementation for platform: ${platform}`);
}

// Use adb to kill the app
return execAsync(`adb shell am force-stop ${packageName}`);
}
};

export default killApp;

0 comments on commit 80e9c2b

Please sign in to comment.