Closed
Bug 1008919
Opened 11 years ago
Closed 11 years ago
Add test to verify geolocation sharing option "Not Now"
Categories
(Mozilla QA Graveyard :: Mozmill Tests, defect)
Mozilla QA Graveyard
Mozmill Tests
Tracking
(firefox31 fixed, firefox32 fixed, firefox33 fixed)
RESOLVED
FIXED
People
(Reporter: mihaelav, Assigned: danisielm)
References
Details
Attachments
(1 file, 7 obsolete files)
Steps:
1. Open a page which uses geolocation
>> The location sharing hanger is displayed
2. Select "Not Now" option
>> The location is not shared
3. Reload the page
>> The location sharing hanger is displayed again
4. Restart the browser and open the page from step 1
>> The location hanger is displayed again
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mentor=AndreeaMatei][lang=js]
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mentor=AndreeaMatei][lang=js] → [mentor=andreea.matei][lang=js]
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → daniel.gherasim
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•11 years ago
|
||
(In reply to Mihaela Velimiroviciu [QA] (:mihaelav) from comment #0)
> 2. Select "Not Now" option
> >> The location is not shared
Not Now option doesn't actually trigger any event. So just waiting to see if a location is retrieved doesn't make sense.
Attachment #8430746 -
Flags: review?(andrei.eftimie)
Attachment #8430746 -
Flags: review?(andreea.matei)
Comment 2•11 years ago
|
||
Comment on attachment 8430746 [details] [diff] [review]
v1.patch
Review of attachment 8430746 [details] [diff] [review]:
-----------------------------------------------------------------
This doesn't have the test included in the patch.
Attachment #8430746 -
Flags: review?(andrei.eftimie)
Attachment #8430746 -
Flags: review?(andreea.matei)
Attachment #8430746 -
Flags: review-
Assignee | ||
Comment 3•11 years ago
|
||
Sorry for that!
Attachment #8430746 -
Attachment is obsolete: true
Attachment #8434810 -
Flags: review?(andrei.eftimie)
Attachment #8434810 -
Flags: review?(andreea.matei)
Comment 4•11 years ago
|
||
Comment on attachment 8434810 [details] [diff] [review]
v1.1.patch
Review of attachment 8434810 [details] [diff] [review]:
-----------------------------------------------------------------
::: firefox/tests/functional/restartTests/testGeolocation_notNowShareLocation/test1.js
@@ +26,5 @@
> + utils.sanitize({siteSettings: true});
> +}
> +
> +/**
> + * Bug 1008913 : Add test to verify geolocation sharing option "Always Share Location"
The option is "Not now"
@@ +40,5 @@
> + var locationLabel = utils.getProperty("chrome://browser/locale/browser.properties",
> + "geolocation.shareLocation");
> + var button = locationBar.getNotificationElement("geolocation-notification",
> + {type: "label",
> + value: locationLabel});
value should align with type.
@@ +59,5 @@
> + controller.restartApplication("testNotNowShareLocationPersisted");
> +}
> +
> +function testNotNowShareLocationPersisted() {
> + // No notification should appear
Actually the comment is wrong, the notification should appear, "not now" it's only temporary.
Attachment #8434810 -
Flags: review?(andrei.eftimie)
Attachment #8434810 -
Flags: review?(andreea.matei)
Attachment #8434810 -
Flags: review-
Assignee | ||
Comment 5•11 years ago
|
||
Updated patch as requested. Will add the review flags once 1st test is done.
Attachment #8434810 -
Attachment is obsolete: true
Updated•11 years ago
|
Mentor: andreea.matei
Whiteboard: [mentor=andreea.matei][lang=js] → [lang=js]
Assignee | ||
Comment 6•11 years ago
|
||
Patch is ready.
Attachment #8439029 -
Attachment is obsolete: true
Attachment #8446475 -
Flags: review?(andrei.eftimie)
Attachment #8446475 -
Flags: review?(andreea.matei)
Comment 7•11 years ago
|
||
Comment on attachment 8446475 [details] [diff] [review]
v3.patch
Review of attachment 8446475 [details] [diff] [review]:
-----------------------------------------------------------------
Please align this more with the already landed test from bug 1008913.
We're missing to test that the geolocation notification is open: // the checkGeoNotificationOpened() helper function.
If we needed that there, I assume we want the same test here...
Other than that, this looks fine.
::: firefox/tests/functional/restartTests/testGeolocation/testNotNowShareLocation.js
@@ +54,5 @@
> + controller.waitForPageLoad();
> + targetPanel = aPanel;
> + }, {type: "notification"});
> +
> + // Check if a Share Location button is visible
This comment appears to be out of place. We're actually clicking on the "Not Now" button
@@ +70,5 @@
> +
> + var notNowAllowMenuItem = locationBar.getElement({type: "notificationPopup_menuItem",
> + value: notNowLabel,
> + parent: menupopup});
> + // Open menupopup from button element
Enhance this comment to explain that we're clicking on the small arrow in the right part of the button to have the menu open
Attachment #8446475 -
Flags: review?(andrei.eftimie)
Attachment #8446475 -
Flags: review?(andreea.matei)
Attachment #8446475 -
Flags: review-
Assignee | ||
Comment 8•11 years ago
|
||
Thanks, patch updated!
Attachment #8446475 -
Attachment is obsolete: true
Attachment #8447136 -
Flags: review?(andrei.eftimie)
Attachment #8447136 -
Flags: review?(andreea.matei)
Comment 9•11 years ago
|
||
Comment on attachment 8447136 [details] [diff] [review]
v4.patch
Review of attachment 8447136 [details] [diff] [review]:
-----------------------------------------------------------------
Looks fine now, lets get a final look from Henrik.
Attachment #8447136 -
Flags: review?(hskupin)
Attachment #8447136 -
Flags: review?(andrei.eftimie)
Attachment #8447136 -
Flags: review?(andreea.matei)
Attachment #8447136 -
Flags: review+
Comment 10•11 years ago
|
||
Comment on attachment 8447136 [details] [diff] [review]
v4.patch
Review of attachment 8447136 [details] [diff] [review]:
-----------------------------------------------------------------
::: firefox/tests/functional/testGeolocation/testNotNowShareLocation.js
@@ +66,5 @@
> + "geolocation.shareLocation");
> + var shareLocationButton = locationBar.getNotificationElement("geolocation-notification",
> + {type: "label",
> + value: locationLabel});
> + var menupopup = locationBar.getElement({type: "notificationPopup_menu",
Please name it 'notificationPopup_buttonMenu'. That would be better understandable here.
@@ +78,5 @@
> +
> + // Click on the small arrow from the left of the 'Share Location' button
> + // to open the menu popup so we can click on 'Not Now' option
> + shareLocationButton.click(shareLocationButton.getNode().clientWidth - 2,
> + shareLocationButton.getNode().clientHeight/2);
I don't really like that. Is there no way to get the dropdown marker? Beside that we use the middle by default, so the 2nd parameter for the height can be left out.
@@ +80,5 @@
> + // to open the menu popup so we can click on 'Not Now' option
> + shareLocationButton.click(shareLocationButton.getNode().clientWidth - 2,
> + shareLocationButton.getNode().clientHeight/2);
> + notNowAllowMenuItem.click();
> + targetPanel = aPanel;
You should really assign this first in the callback. Otherwise if a click fails above, the popup will not be closed in teardownTest. Please also check the other patches, and the already landed test. This may apply to any of the callback methods.
@@ +114,5 @@
> + // Check the icon inside the popup notification exists
> + var notification = locationBar.getElement({type: "notification_element",
> + subtype: "geolocation-notification",
> + parent: locationBar.getNotification()});
> + expect.ok(notification, "The geolocation notification is opened");
Lets make sure we get all those method instances out of the tests in the toolbar module as part of bug 1000832.
Attachment #8447136 -
Flags: review?(hskupin) → review-
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #10)
> Comment on attachment 8447136 [details] [diff] [review]
> v4.patch
>
> Review of attachment 8447136 [details] [diff] [review]:
> -----------------------------------------------------------------
> @@ +78,5 @@
> > +
> > + // Click on the small arrow from the left of the 'Share Location' button
> > + // to open the menu popup so we can click on 'Not Now' option
> > + shareLocationButton.click(shareLocationButton.getNode().clientWidth - 2,
> > + shareLocationButton.getNode().clientHeight/2);
>
> I don't really like that. Is there no way to get the dropdown marker? Beside
> that we use the middle by default, so the 2nd parameter for the height can
> be left out.
Couldn't find any other solution. That <menupopup> it's wrapped in the <button> element & I don't see a way to trigger an event to that arrow.
> @@ +114,5 @@
> > + // Check the icon inside the popup notification exists
> > + var notification = locationBar.getElement({type: "notification_element",
> > + subtype: "geolocation-notification",
> > + parent: locationBar.getNotification()});
> > + expect.ok(notification, "The geolocation notification is opened");
>
> Lets make sure we get all those method instances out of the tests in the
> toolbar module as part of bug 1000832.
Pointed that in bug 1000832
Attachment #8447136 -
Attachment is obsolete: true
Attachment #8447941 -
Flags: review?(andrei.eftimie)
Attachment #8447941 -
Flags: review?(andreea.matei)
Assignee | ||
Comment 12•11 years ago
|
||
Fixed some nits.
Attachment #8447941 -
Attachment is obsolete: true
Attachment #8447941 -
Flags: review?(andrei.eftimie)
Attachment #8447941 -
Flags: review?(andreea.matei)
Attachment #8447943 -
Flags: review?(andrei.eftimie)
Attachment #8447943 -
Flags: review?(andreea.matei)
Assignee | ||
Comment 13•11 years ago
|
||
Other small nit.
Attachment #8447943 -
Attachment is obsolete: true
Attachment #8447943 -
Flags: review?(andrei.eftimie)
Attachment #8447943 -
Flags: review?(andreea.matei)
Attachment #8447944 -
Flags: review?(andrei.eftimie)
Attachment #8447944 -
Flags: review?(andreea.matei)
Comment 14•11 years ago
|
||
Comment on attachment 8447944 [details] [diff] [review]
v4.3.patch
Review of attachment 8447944 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks Daniel.
Attachment #8447944 -
Flags: review?(hskupin)
Attachment #8447944 -
Flags: review?(andrei.eftimie)
Attachment #8447944 -
Flags: review?(andreea.matei)
Attachment #8447944 -
Flags: review+
Updated•11 years ago
|
Mentor: andreea.matei
Whiteboard: [lang=js]
Updated•11 years ago
|
Attachment #8447944 -
Flags: review?(hskupin) → review+
Assignee | ||
Comment 15•11 years ago
|
||
Patch applies cleanly on Default, Aurora & Beta.
Windows:
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4a50ca
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4c0e21
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4ea3ee
Linux:
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4a874a
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4aa3ec
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4cdfb9
Mac:
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4a6adc
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc4cf32a
http://mozmill-crowd.blargon7.com/#/functional/report/59ac3f70f127c02da3a59eb1fc5239eb
Comment 16•11 years ago
|
||
Comment on attachment 8447944 [details] [diff] [review]
v4.3.patch
Review of attachment 8447944 [details] [diff] [review]:
-----------------------------------------------------------------
Landed:
https://hg.mozilla.org/qa/mozmill-tests/rev/1f08b3f4623a (default)
Attachment #8447944 -
Flags: checkin+
Updated•11 years ago
|
Comment 17•11 years ago
|
||
Transplanted:
https://hg.mozilla.org/qa/mozmill-tests/rev/daddd5c45709 (mozilla-aurora)
https://hg.mozilla.org/qa/mozmill-tests/rev/c505356ca261 (mozilla-beta)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•