Skip to content

Commit

Permalink
fix: e2e tests flakiness (due to permission popup)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed May 7, 2024
1 parent 3540f63 commit f19732f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/utils/installApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)))
);
}

0 comments on commit f19732f

Please sign in to comment.