ReviewOS

also looking at this

craft-native/craft

test(mobile-e2e): prove Android reports approximate location as granted

#214
Merged glennmichael123 wants to merge fix/android-location-granted into main
5 files +85 -5
scripts/mobile-e2e/driver.htmlmodified+6-1
Changes to scripts/mobile-e2e/driver.html
@@ -170,8 +170,13 @@
170170 // already holds used to wait for an authorization change that never
171171 // comes, because nothing changes. The harness grants it with
172172 // `simctl privacy` before launch, so both calls must answer at once.
173 //
174 // And #192 on Android, where a device with location granted reported
175 // something other than `granted`. The harness grants approximate
176 // location only, with `pm grant`, which is the case a bridge
177 // requiring precise location gets wrong.
173178 name: 'permissions.location.granted',
174 platforms: ['ios'],
179 platforms: ['ios', 'android'],
175180 run: function () {
176181 return withTimeout(function () { return window.craft.permissions.check('location') }).then(function (checked) {
177182 if (checked.state !== 'resolved') return 'permissions.check ' + checked.state + ' ' + (checked.error ? checked.error.message : '')