Skip to content

Commit

Permalink
Fix permission tests
Browse files Browse the repository at this point in the history
  • Loading branch information
piotruela committed Nov 3, 2024
1 parent 66c1018 commit a88afac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-ios-simulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
sleep 10 # See https://github.com/leancodepl/patrol/issues/1282
TESTS_EXIT_CODE=0
patrol test --exclude ${{ env.EXCLUDED_TESTS }} --verbose || TESTS_EXIT_CODE=$?
patrol test --exclude ${{ env.EXCLUDED_TESTS }} --verbose --clear-permissions || TESTS_EXIT_CODE=$?
kill -SIGINT $recordingpid
kill -SIGINT $logpid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Future<void> _requestAndDenyMicrophonePermission(
Future<void> _requestAndDenyLocationPermission(
PatrolIntegrationTester $,
) async {
if (!await Permission.contacts.isGranted) {
if (!await Permission.location.isGranted) {
expect($(#location).$(#statusText).text, 'Not granted');
await $('Request contacts permission').tap();
await $('Request location permission').tap();
if (await $.native.isPermissionDialogVisible(timeout: _timeout)) {
await $.native.denyPermission();
await $.pump();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Future<void> _requestAndDenyLocationPermission(
) async {
if (!await Permission.location.isGranted) {
expect($(#location).$(#statusText).text, 'Not granted');
await $('Request contacts permission').tap();
await $('Request location permission').tap();
if (await $.native.isPermissionDialogVisible(timeout: _timeout)) {
await $.native.denyPermission();
await $.pump();
Expand Down

0 comments on commit a88afac

Please sign in to comment.