Closed
Bug 809434
Opened 12 years ago
Closed 12 years ago
Get rid of controller.assertChecked() in favor of expect.* and assert.* methods
Categories
(Mozilla QA Graveyard :: Mozmill Tests, defect, P2)
Mozilla QA Graveyard
Mozmill Tests
Tracking
(firefox17 wontfix, firefox18 fixed, firefox19 fixed, firefox20 fixed, firefox-esr10 fixed, firefox-esr17 fixed)
People
(Reporter: whimboo, Assigned: mario.garbi)
References
()
Details
(Whiteboard: s=121119 u=enhancement c=assertions p=1)
Attachments
(3 files, 4 obsolete files)
(deleted),
patch
|
davehunt
:
review+
davehunt
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
AndreeaMatei
:
review+
whimboo
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
AndreeaMatei
:
review+
|
Details | Diff | Splinter Review |
Similar to bug 782918 we should update our tests and replace any instance of controller.assertChecked() with the appropriate assert.* or expect.* call.
Reporter | ||
Updated•12 years ago
|
Priority: -- → P2
Updated•12 years ago
|
Whiteboard: [mentor=whimboo][lang=js][good first bug] → [mentor=whimboo][lang=js][good first bug] s=121119 u=enhancement c=assertions p=1
Reporter | ||
Updated•12 years ago
|
Whiteboard: [mentor=whimboo][lang=js][good first bug] s=121119 u=enhancement c=assertions p=1 → s=121119 u=enhancement c=assertions p=1
Updated•12 years ago
|
Whiteboard: s=121119 u=enhancement c=assertions p=1 → s= u=enhancement c=assertions p=1
Updated•12 years ago
|
Whiteboard: s= u=enhancement c=assertions p=1 → s=121119 u=enhancement c=assertions p=1
Updated•12 years ago
|
Assignee: nobody → alex.lakatos
Status: NEW → ASSIGNED
Reporter | ||
Comment 1•12 years ago
|
||
Do we have an update on that bug? Alex, if you can't work on it please ensure it find the appropriate owner.
Updated•12 years ago
|
Assignee: alex.lakatos → mario.garbi
Assignee | ||
Comment 2•12 years ago
|
||
changed controller.assertChecked with assert.*
Attachment #693801 -
Flags: review?(hskupin)
Attachment #693801 -
Flags: review?(dave.hunt)
Attachment #693801 -
Flags: review?(andreea.matei)
Comment 3•12 years ago
|
||
Comment on attachment 693801 [details] [diff] [review]
patch v1.0
Review of attachment 693801 [details] [diff] [review]:
-----------------------------------------------------------------
::: tests/functional/testPreferences/testDefaultPhishingEnabled.js
@@ +3,5 @@
> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>
> // Include necessary modules
> var prefs = require("../../../lib/prefs");
> +var { assert } = require("../../../lib/assertions");
This needs to be above prefs.
@@ +44,5 @@
>
> /**
> * Map test functions to litmus tests
> */
> // testDefaultPhishingEnabled.meta = {litmusids : [8290]};
I would like to have this removed since we're here and no longer use litmus.
::: tests/functional/testPreferences/testDefaultSecurityPrefs.js
@@ +3,5 @@
> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>
> // Include necessary modules
> var prefs = require("../../../lib/prefs");
> +var { assert } = require("../../../lib/assertions");
This needs to be above prefs.
@@ +44,5 @@
>
> /**
> * Map test functions to litmus tests
> */
> // testDefaultSecurityPreferences.meta = {litmusids : [8060]};
I would like to have this removed since we're here and no longer use litmus.
Attachment #693801 -
Flags: review?(hskupin)
Attachment #693801 -
Flags: review?(dave.hunt)
Attachment #693801 -
Flags: review?(andreea.matei)
Attachment #693801 -
Flags: review-
Assignee | ||
Comment 4•12 years ago
|
||
Modified patch based on review.
Attachment #693801 -
Attachment is obsolete: true
Attachment #693811 -
Flags: review?(hskupin)
Attachment #693811 -
Flags: review?(dave.hunt)
Attachment #693811 -
Flags: review?(andreea.matei)
Comment 5•12 years ago
|
||
Comment on attachment 693811 [details] [diff] [review]
patch v1.1
Review of attachment 693811 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. Landed as:
http://hg.mozilla.org/qa/mozmill-tests/rev/7be14decebeb
Attachment #693811 -
Flags: review?(hskupin)
Attachment #693811 -
Flags: review?(dave.hunt)
Attachment #693811 -
Flags: review?(andreea.matei)
Attachment #693811 -
Flags: review+
Attachment #693811 -
Flags: checkin+
Updated•12 years ago
|
status-firefox20:
--- → fixed
Comment 6•12 years ago
|
||
Let's get this backported once we see there are no regressions. Please test and provide backport patches as needed.
status-firefox-esr10:
--- → affected
status-firefox17:
--- → affected
status-firefox18:
--- → affected
status-firefox19:
--- → affected
status-firefox-esr17:
--- → affected
Assignee | ||
Comment 7•12 years ago
|
||
Works with all branches other than Default (esr, aurora, beta, release).
esr10 : http://mozmill-crowd.blargon7.com/#/functional/report/a11aa7b15f4e571fd6fe21a2db86db3c
esr17 : http://mozmill-crowd.blargon7.com/#/functional/report/a11aa7b15f4e571fd6fe21a2db8743a1
release 17 : http://mozmill-crowd.blargon7.com/#/functional/report/a11aa7b15f4e571fd6fe21a2db88b354
beta 18 : http://mozmill-crowd.blargon7.com/#/functional/report/a11aa7b15f4e571fd6fe21a2db8901d8
aurora 19 : http://mozmill-crowd.blargon7.com/#/functional/report/a11aa7b15f4e571fd6fe21a2db8a3fb2
Attachment #693901 -
Flags: review?(hskupin)
Attachment #693901 -
Flags: review?(dave.hunt)
Attachment #693901 -
Flags: review?(andreea.matei)
Reporter | ||
Comment 8•12 years ago
|
||
Comment on attachment 693901 [details] [diff] [review]
patch v1.2 Non-Default
Review of attachment 693901 [details] [diff] [review]:
-----------------------------------------------------------------
::: tests/functional/testPreferences/testDefaultPhishingEnabled.js
@@ +36,5 @@
>
> // Verify Block Attack Sites and Reported Web Forgeries are checked by default
> controller.waitForElement(attackElem, gTimeout);
> + assert.ok(attackElem.getNode().checked, "Block Attack Sites checkbox is checked");
> + assert.ok(forgeryElem.getNode().checked, "Reported Web Forgeries checkbox is checked");
Why are those two lines an assert while it has to be an expect? Please come up with a follow-up patch for default. Afterward you can come up with a new backport patch.
::: tests/functional/testPreferences/testDefaultSecurityPrefs.js
@@ +36,5 @@
> var sslPref = new elementslib.ID(controller.window.document, "useSSL3");
> var tlsPref = new elementslib.ID(controller.window.document, "useTLS1");
> controller.waitForElement(sslPref, gTimeout);
> + assert.ok(sslPref.getNode().checked, "SSL3 Preferences checkbox is checked");
> + assert.ok(tlsPref.getNode().checked, "TLS1 Preferences checkbox is checked");
Same here.
Attachment #693901 -
Flags: review?(hskupin)
Attachment #693901 -
Flags: review?(dave.hunt)
Attachment #693901 -
Flags: review?(andreea.matei)
Attachment #693901 -
Flags: review-
Assignee | ||
Comment 9•12 years ago
|
||
Changed "assert.ok" into "expect.ok" as requested above.
Attachment #693811 -
Attachment is obsolete: true
Attachment #694295 -
Flags: review?(hskupin)
Attachment #694295 -
Flags: review?(dave.hunt)
Attachment #694295 -
Flags: review?(andreea.matei)
Comment 10•12 years ago
|
||
Comment on attachment 694295 [details] [diff] [review]
patch v1.3 Default
Review of attachment 694295 [details] [diff] [review]:
-----------------------------------------------------------------
Just few more things and we're good to go.
::: tests/functional/testFormManager/testClearFormHistory.js
@@ +2,5 @@
> * License, v. 2.0. If a copy of the MPL was not distributed with this
> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>
> // Include required modules
> +var { assert, expect } = require("../../../lib/assertions");
No need for expect here, it is not used.
::: tests/functional/testPreferences/testDefaultPhishingEnabled.js
@@ +2,5 @@
> * License, v. 2.0. If a copy of the MPL was not distributed with this
> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>
> // Include necessary modules
> +var { assert, expect } = require("../../../lib/assertions");
If you changed to expect only, there is no need to declare assert too, it is not used.
::: tests/functional/testPreferences/testDefaultSecurityPrefs.js
@@ +2,5 @@
> * License, v. 2.0. If a copy of the MPL was not distributed with this
> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>
> // Include necessary modules
> +var { assert, expect } = require("../../../lib/assertions");
Same here, no need for assert.
Attachment #694295 -
Flags: review?(hskupin)
Attachment #694295 -
Flags: review?(dave.hunt)
Attachment #694295 -
Flags: review?(andreea.matei)
Attachment #694295 -
Flags: review-
Assignee | ||
Comment 11•12 years ago
|
||
Removed { assert } where it was not used used any more.
Attachment #694295 -
Attachment is obsolete: true
Attachment #694351 -
Flags: review?(hskupin)
Attachment #694351 -
Flags: review?(dave.hunt)
Attachment #694351 -
Flags: review?(andreea.matei)
Updated•12 years ago
|
Attachment #693811 -
Attachment is obsolete: false
Comment 12•12 years ago
|
||
Comment on attachment 694351 [details] [diff] [review]
patch v1.4 Default
Review of attachment 694351 [details] [diff] [review]:
-----------------------------------------------------------------
This patch does not apply cleanly because you have already checked in the previous patch (with asserts instead of expect).
You need to make a follow-up patch with the changes Henrik and I requested (replacing those asserts with expect() and make sure what modules you import).
Please always work with clean repository and don't mark the patches that are already checked-in as obsolete.
Thanks.
Attachment #694351 -
Flags: review?(hskupin)
Attachment #694351 -
Flags: review?(dave.hunt)
Attachment #694351 -
Flags: review?(andreea.matei)
Attachment #694351 -
Flags: review-
Assignee | ||
Comment 13•12 years ago
|
||
Follow up patch that changes Assert into Expect as requested.
Attachment #694351 -
Attachment is obsolete: true
Attachment #695964 -
Flags: review?(hskupin)
Attachment #695964 -
Flags: review?(dave.hunt)
Attachment #695964 -
Flags: review?(andreea.matei)
Comment 14•12 years ago
|
||
Comment on attachment 695964 [details] [diff] [review]
patch v1.5 FollowUp for Default
Review of attachment 695964 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good now. Thanks.
We'll need this changes backported as well.
Attachment #695964 -
Flags: review?(hskupin)
Attachment #695964 -
Flags: review?(dave.hunt)
Attachment #695964 -
Flags: review?(andreea.matei)
Attachment #695964 -
Flags: review+
Updated•12 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 15•12 years ago
|
||
Comment on attachment 695964 [details] [diff] [review]
patch v1.5 FollowUp for Default
Review of attachment 695964 [details] [diff] [review]:
-----------------------------------------------------------------
This patch doesn't contain any commit message. Please make sure in the future there is one set before uploading a patch.
http://hg.mozilla.org/qa/mozmill-tests/rev/ff78ef35d434 (default)
Attachment #695964 -
Flags: checkin+
Reporter | ||
Updated•12 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 16•12 years ago
|
||
Patch ported for all other branches as requested. Reports coming in a second.
Attachment #693901 -
Attachment is obsolete: true
Attachment #698704 -
Flags: review?(hskupin)
Attachment #698704 -
Flags: review?(dave.hunt)
Attachment #698704 -
Flags: review?(andreea.matei)
Reporter | ||
Comment 17•12 years ago
|
||
No need to land this on aurora given that the merge moved it forward from default already.
Other branches:
http://hg.mozilla.org/qa/mozmill-tests/rev/125d828535a5 (beta)
http://hg.mozilla.org/qa/mozmill-tests/rev/2a433439be6d (release)
http://hg.mozilla.org/qa/mozmill-tests/rev/1c7990d21541 (esr17)
http://hg.mozilla.org/qa/mozmill-tests/rev/687e98c1b731 (esr10)
Reporter | ||
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Attachment #698704 -
Flags: review?(hskupin)
Attachment #698704 -
Flags: review?(dave.hunt)
Attachment #698704 -
Flags: review?(andreea.matei)
Attachment #698704 -
Flags: review+
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
•