Skip to content

Commit

Permalink
chore: don't log the error two times (the first one is already logged…
Browse files Browse the repository at this point in the history
… on level)
  • Loading branch information
kirillzyusko committed May 13, 2024
1 parent a40506e commit d5d9d02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/e2e/utils/installApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ export default function (packageName: string, path: string, platform = 'android'
// install the app
execAsync(`adb install ${path}`).then(() =>
// and grant push notifications permissions right away (the popup may block e2e tests sometimes)
execAsync(`adb shell pm grant ${packageName.split('/')[0]} android.permission.POST_NOTIFICATIONS`).catch((error: ExecException) =>
// eslint-disable-next-line @typescript-eslint/no-unused-vars
execAsync(`adb shell pm grant ${packageName.split('/')[0]} android.permission.POST_NOTIFICATIONS`).catch((_: ExecException) =>
// in case of error - just log it and continue (if we request this permission on Android < 13 it'll fail because there is no such permission)
Logger.warn('Failed to grant push notifications permissions:', error.message),
Logger.warn(
'Failed to grant push notifications permissions. It might be due to the fact that push-notifications permission type is not supported on this OS version yet. Continue tests execution...',
),
),
),
)
Expand Down

0 comments on commit d5d9d02

Please sign in to comment.