Closed
Bug 493851
Opened 15 years ago
Closed 15 years ago
[mozmill] - Options (Preferences) dialog state retention
Categories
(Mozilla QA Graveyard :: Mozmill Tests, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aakashd, Assigned: aakashd)
References
Details
Attachments
(1 file, 6 obsolete files)
(deleted),
patch
|
whimboo
:
review+
|
Details | Diff | Splinter Review |
The following test Open the options dialog, opens the privacy pane, re-opens the options dialog and verifies if the privacy pane is open.
This test case won't work on Windows until the Bug listed in the "Depends On"
section is fixed.
It references litmus testcases:
* Testcase ID #5971 - Options (Preferences) dialog state retention
* Testcase ID #5972 - Open and dismiss the Options (Preferences) dialog
Attachment #378449 -
Flags: review?(hskupin)
Updated•15 years ago
|
Attachment #378449 -
Flags: review?(hskupin) → review-
Comment 1•15 years ago
|
||
Comment on attachment 378449 [details]
testOptions/testOptionsDialogRetention.js
>const gDelay = 1000;
Please think about that this should always be 0 when requesting review.
>var testOptionsDialogRetention = function() {
>
> // Open the options dialog window
> controller.click(new elementslib.ID(controller.window.document, "menu_preferences"));
> controller.sleep(gDelay);
> var window = mozmill.wm.getMostRecentWindow('');
> var prefController = new mozmill.controller.MozMillController(window);
This is the wrong way of opening the preferences dialog. Please use the controller.menus API for the click call. Further please move it to its own function. We use it at least twice in this test module.
> // Select the Privacy Pane in the Options Dialog Window
> var paneCheck = '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})/{"pane":"panePrivacy","label":"Privacy"}';
Please select another pane before you show the privacy pane. You don't know in which state the preferences dialog will stay when you open it the first time. Also remove the label attribute and call it privacyButton. Please always call this dialog preferences.
> // Close the Options Dialog Window
> var prefWindow = new elementslib.Lookup(prefController.window.document, '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})');
> prefController.keypress(prefWindow,27,false,false,false,false);
Can you please move this to a helper function. We will use it at least 3 times.
> // ReOpen the Options Dialog Window
> controller.sleep(gDelay);
> controller.click(new elementslib.ID(controller.window.document, "menu_preferences"));
>
> var window = mozmill.wm.getMostRecentWindow('');
> var prefCheck = new mozmill.controller.MozMillController(window);
As said above, it should be in its own function.
> // Check if the Privacy Pane is retained
> var checkNode = new elementslib.ID(prefCheck.window.document, 'panePrivacy');
> controller.sleep(gDelay);
> utils.delayedAssertNode(prefCheck, checkNode);
Please give it a better name like privacyPane.
> // Close the Options Dialog Window
> var prefCheckWindow = new elementslib.Lookup(prefCheck.window.document, '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})');
> prefCheck.keypress(prefCheckWindow,27,false,false,false,false);
As said, please in its own function.
Assignee | ||
Comment 2•15 years ago
|
||
Do you want the functions within the test-case or in another API file? If so, what would you like the name of the API file to be?
Assignee | ||
Comment 3•15 years ago
|
||
Never mind, changes are being made. Will put up the necessary files soon.
Assignee | ||
Comment 4•15 years ago
|
||
Here's the new test case with a created testOptionsAPI.js file as well
Assignee: nobody → adesai
Attachment #378449 -
Attachment is obsolete: true
Attachment #382331 -
Flags: review?(hskupin)
Assignee | ||
Comment 5•15 years ago
|
||
API file for the options testcases. Once this is pushed to the fileset, the functions will be updated to the other pushed test cases.
Attachment #382332 -
Flags: review?(hskupin)
Updated•15 years ago
|
Attachment #382332 -
Attachment is obsolete: true
Attachment #382332 -
Flags: review?(hskupin)
Comment 6•15 years ago
|
||
Comment on attachment 382332 [details]
shared-modules/testOptionsAPI.js
As said on IRC the API is added by bug 486407.
Comment 7•15 years ago
|
||
Comment on attachment 382331 [details]
testOptions/testOptionsDialogRetention.js
Needs to be updated with the new prefsdialog api when it has been checked-in.
Attachment #382331 -
Attachment mime type: application/x-javascript → text/plain
Attachment #382331 -
Flags: review?(hskupin)
Comment 8•15 years ago
|
||
The preferences dialog API has been implemented. See bug 486407 for an example how to implement it.
Assignee | ||
Comment 9•15 years ago
|
||
This one works perfectly for me at least.
Attachment #382331 -
Attachment is obsolete: true
Attachment #383810 -
Flags: review?(hskupin)
Comment 10•15 years ago
|
||
Comment on attachment 383810 [details] [diff] [review]
testOptionsDialogRetention.js
Aakash, this test looks great! We only have to make one small update. Please select at least two panes in the first preference dialog call. It can be that the pref pane was already selected before your test is executed. With that change you have a r+.
Attachment #383810 -
Flags: review?(hskupin) → review-
Assignee | ||
Comment 11•15 years ago
|
||
Ask and you will receive :)
Attachment #383810 -
Attachment is obsolete: true
Attachment #383934 -
Flags: review?(hskupin)
Assignee | ||
Comment 12•15 years ago
|
||
added delayAssertNode to first pane check
Attachment #383934 -
Attachment is obsolete: true
Attachment #384177 -
Flags: review?(hskupin)
Attachment #383934 -
Flags: review?(hskupin)
Comment 13•15 years ago
|
||
Comment on attachment 384177 [details] [diff] [review]
testOptionsDialogRetention.js
There is one thing I have seen while running this test:
>var prefPaneSetCallback = function(controller) {
>
> // Select the Advanced Pane in the Options Dialog Window
> var firstPane = '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})/{"pane":"paneAdvanced","label":"Advanced"}';
> controller.click(new elementslib.Lookup(controller.window.document, firstPane));
> controller.sleep(gDelay);
>
> // Check if the panel is active in the Options Dialog Window
> var node = new elementslib.ID(controller.window.document, 'paneAdvanced');
> UtilsAPI.delayedAssertNode(controller, node);
>
> // Select the Privacy Pane in the Options Dialog Window
> var paneCheck = '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})/{"pane":"panePrivacy","label":"Privacy"}';
>
> controller.click(new elementslib.Lookup(controller.window.document, paneCheck));
> controller.sleep(gDelay);
>
> // Check if the panel is active in the Options Dialog Window
> var node = new elementslib.ID(controller.window.document, 'panePrivacy');
> UtilsAPI.delayedAssertNode(controller, node);
Here we should wait for the pane itself here. Currently we wait for the buttons which are still existent. Sorry for seeing so late but I will remember to run those tests also in an early stage of review.
Can you please fix this? And further please remove the label elements inside the Lookup calls.
>
> // Close the Options Dialog Window
> controller.keypress(null, 'VK_ESCAPE', {});
>}
>
>var prefPaneCheckCallback = function(controller) {
>
> // Check if the Privacy Pane is retained
> var privacyPaneCheck = new elementslib.ID(controller.window.document, 'panePrivacy');
> controller.sleep(gDelay);
> UtilsAPI.delayedAssertNode(controller, privacyPaneCheck);
>
> // Close the Options Dialog Window
> controller.keypress(null, 'VK_ESCAPE', {});
>}
Attachment #384177 -
Flags: review?(hskupin) → review-
Assignee | ||
Comment 14•15 years ago
|
||
Um, Henrik, what do you mean by "we should wait for the pane itself"? The test case is waiting for the pane itself. The button's is labeled as:
new elementslib.Lookup(controller.window.document, '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})/{"pane":"paneMain","label":"Main"}')
and the pane is labeled as:
new elementslib.ID(controller.window.document, "paneMain")
via the inspector.
Also, how would you change the label elements in the lookup calls....
Assignee | ||
Comment 15•15 years ago
|
||
checking for elements in the panes instead of the panes themselves now.
Attachment #384177 -
Attachment is obsolete: true
Attachment #384425 -
Flags: review?(hskupin)
Comment 16•15 years ago
|
||
Comment on attachment 384425 [details] [diff] [review]
testOptionsDialogRetention.js
As talked on IRC yesterday we need to reset the pane first before we can run any test which checks for the retention. I'll add this function and checkin this test.
Attachment #384425 -
Flags: review?(hskupin) → review+
Comment 17•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 18•14 years ago
|
||
Mass move of Mozmill Test related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: Preferences → Mozmill Tests
Product: Firefox → Mozilla QA
QA Contact: preferences → mozmill-tests
Updated•5 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
•