Closed Bug 933709 Opened 11 years ago Closed 11 years ago

Write test for geolocation prompt

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zcampbell, Assigned: tupchii.sergii)

Details

(Whiteboard: [gaia-ui-test][mentor=zac][lang=py])

Attachments

(1 file)

46 bytes, text/x-github-pull-request
Bebe
: review+
moz.teodosia
: review+
Details | Review
* At the moment this is busted on m-c build*


STR
1. Load firefox os
2. Load 'geoloc' app
3. Switch back to system frame and check that the the geolocation prompt clears
4. Poll the settings db to check that the pref has been set appropriately.
Do we have a bug tracking this bustage?
Flags: needinfo?(zcampbell)
Sorry I should have thought of that! Bug 933075.

This is not a blocker, the test could be written on last week's build and xfailed.
Flags: needinfo?(zcampbell)
Chuck, in the camera test we force this setting into 'deny' so it does not interrupt the test:

self.apps.set_permission('Camera', 'geolocation', 'deny')

We want it to be 'ask' so that you see the geolocation prompt. In case the permission is not set to 'ask' by default you may need to force it in the test setUp.

Similarly use self.apps.get_permission to complete step 4.
Assignee: nobody → tupchii.sergii
Sergei and I talked about this in email and we thought it might be easier to use the "Camera" app because it already has an app object with locators, waits and what not.

The same effect will be achieved because the Camera also asks for the geolocation prompt.
So for camera app steps would be:

STR
1. Load firefox os
2. Load 'Camera' app
3. Switch back to system frame and wait for geolocation prompt displayed
4. Accept the geolocation prompt
5. Poll the settings db to check that the pref has been set appropriately.
In case it's relevant we use http://mozqa.com/data/firefox/geolocation/position.html for testing geolocation prompts on desktop Firefox.
Attached file pull request
added my thoughts implementation, please review...
Attachment #827112 - Flags: review?(zcampbell)
Attachment #827112 - Flags: review?(florin.strugariu)
:davehunt thanks for the tip, I think it should be split-ed to some other bug/testcase, which will use this technique to determine location and compare with location returned from device... This one was about permission notification (prompt). But I think your cases should be related to Geoloc app, which I don't know if it should be officially included into apps/ classes, and written tests specifically for it...
Attachment #827112 - Flags: review?(florin.strugariu) → review+
Attachment #827112 - Flags: review-
Attachment #827112 - Flags: review- → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #827112 - Flags: review?(zcampbell)
We need this test for the v1.2 branch too.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: