diff --git a/tests/e2e/utils/installApp.ts b/tests/e2e/utils/installApp.ts index dc6a9d64053f..82d0066c885b 100644 --- a/tests/e2e/utils/installApp.ts +++ b/tests/e2e/utils/installApp.ts @@ -19,7 +19,8 @@ export default function (packageName: string, path: string, platform = 'android' // Ignore errors Logger.warn('Failed to uninstall app:', error.message); }) + // install and grant push notifications permissions right away (the popup may block e2e tests sometimes) // eslint-disable-next-line @typescript-eslint/no-misused-promises - .finally(() => execAsync(`adb install ${path}`)) + .finally(() => execAsync(`adb install ${path}`).then(() => execAsync(`adb shell pm grant ${packageName.split('/')[0]} android.permission.POST_NOTIFICATIONS`))) ); }