Skip to content

Commit

Permalink
Merge pull request #41789 from margelo/fix/e2e-popup-flakiness
Browse files Browse the repository at this point in the history
fix: e2e tests flakiness (due to permission popup)
  • Loading branch information
thienlnam authored May 7, 2024
2 parents eb0c15e + f19732f commit badec94
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 badec94

Please sign in to comment.