Closed Bug 1108994 Opened 10 years ago Closed 10 years ago

Refactor testAddons_installMultipleExtensions from multiple files into a single file

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

Version 3
defect
Not set
normal

Tracking

(firefox35 fixed, firefox36 fixed, firefox37 fixed)

RESOLVED FIXED
Tracking Status
firefox35 --- fixed
firefox36 --- fixed
firefox37 --- fixed

People

(Reporter: daniela.domnici, Assigned: daniela.domnici)

References

Details

Attachments

(3 files, 2 obsolete files)

Combined two tests from testAddons_installMultipleExtensions into one test.
Attached patch patch_V1 (obsolete) — Splinter Review
Attachment #8533647 - Flags: review?(mihaela.velimiroviciu)
Attachment #8533647 - Flags: review?(andreea.matei)
Summary: Refactor testAdons_installMultipleExtensions from multiple files into a single file → Refactor testAddons_installMultipleExtensions from multiple files into a single file
Comment on attachment 8533647 [details] [diff] [review]
patch_V1

Review of attachment 8533647 [details] [diff] [review]:
-----------------------------------------------------------------

The tests fails intermittently (but most of the times) for me:
ERROR | Test Failure | {
  "exception": {
    "message": "Notification popup state has been opened", 
    "lineNumber": 27, 
    "name": "TimeoutError", 
    "fileName": "resource://mozmill/modules/errors.js"
  }
}

::: firefox/tests/functional/testAddons/testInstallMultipleExtensions.js
@@ +106,5 @@
> +function testCheckMultipleExtensionsAreInstalled() {
> +  addonsManager.open();
> +  addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});
> +
> +   ADDONS.forEach(function (aAddon) {

There is extra whitespace before ADDONS.forEach

@@ +109,5 @@
> +
> +   ADDONS.forEach(function (aAddon) {
> +
> +    //Verify the addons are installed
> +    var aAddon = addonsManager.getAddons({attribute: "value", value: ADDONS.id})[0];

* aAddon is already used, please choose other variable name
* value: aAddon.id

@@ +110,5 @@
> +   ADDONS.forEach(function (aAddon) {
> +
> +    //Verify the addons are installed
> +    var aAddon = addonsManager.getAddons({attribute: "value", value: ADDONS.id})[0];
> +    var addonIsInstalled = addonsManager.isAddonInstalled({addon: aAddon});

Use the variable defined at previous line instead of aAddon
Attachment #8533647 - Flags: review?(mihaela.velimiroviciu)
Attachment #8533647 - Flags: review?(andreea.matei)
Attachment #8533647 - Flags: review-
Also update the commit message and remove [include:testAddons_installMultipleExtensions/manifest.ini] from firefox/tests/functional/restartTests/manifest.ini :)
Blocks: 1096178
Attached patch patch_V2 (obsolete) — Splinter Review
updated patch
Attachment #8533647 - Attachment is obsolete: true
Attachment #8536589 - Flags: review?(mihaela.velimiroviciu)
Attachment #8536589 - Flags: review?(andreea.matei)
Comment on attachment 8536589 [details] [diff] [review]
patch_V2

Review of attachment 8536589 [details] [diff] [review]:
-----------------------------------------------------------------

Just a couple of small notes...

::: firefox/tests/functional/testAddons/testInstallMultipleExtensions.js
@@ +107,5 @@
> + * Verifies the addons are installed
> + */
> +function testCheckMultipleExtensionsAreInstalled() {
> +  addonsManager.open();
> +  addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});

It would be better to assign addonsManager.getCategoryById({id: "extension"}) to a variable before you use it.

@@ +108,5 @@
> + */
> +function testCheckMultipleExtensionsAreInstalled() {
> +  addonsManager.open();
> +  addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});
> +  ADDONS.forEach(function(aAddon) {

You also removed the blank line which was before this, please add it back
Attachment #8536589 - Flags: review?(mihaela.velimiroviciu)
Attachment #8536589 - Flags: review?(andreea.matei)
Attachment #8536589 - Flags: review+
Comment on attachment 8536589 [details] [diff] [review]
patch_V2

Review of attachment 8536589 [details] [diff] [review]:
-----------------------------------------------------------------

::: firefox/tests/functional/testAddons/testInstallMultipleExtensions.js
@@ +109,5 @@
> +function testCheckMultipleExtensionsAreInstalled() {
> +  addonsManager.open();
> +  addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});
> +  ADDONS.forEach(function(aAddon) {
> +    //Verify the addons are installed

Please also add a space here after //
Attached patch patch_V3Splinter Review
Updated patch
Attachment #8536589 - Attachment is obsolete: true
Attachment #8537147 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537147 - Flags: review?(andreea.matei)
Comment on attachment 8537147 [details] [diff] [review]
patch_V3

Review of attachment 8537147 [details] [diff] [review]:
-----------------------------------------------------------------

http://hg.mozilla.org/qa/mozmill-tests/rev/9e4de6c007f8 (default)
Attachment #8537147 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537147 - Flags: review?(andreea.matei)
Attachment #8537147 - Flags: review+
I`ve created a new patch for aurora branch.
Attachment #8537678 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537678 - Flags: review?(andreea.matei)
Comment on attachment 8537678 [details] [diff] [review]
Aurora_installMultipleExtensions_V1

Review of attachment 8537678 [details] [diff] [review]:
-----------------------------------------------------------------

http://hg.mozilla.org/qa/mozmill-tests/rev/ab3a4690cf29 (aurora)
Attachment #8537678 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537678 - Flags: review?(andreea.matei)
Attachment #8537678 - Flags: review+
Status: NEW → ASSIGNED
I`ve created a new patch for beta branch.
Attachment #8537819 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537819 - Flags: review?(andreea.matei)
Comment on attachment 8537819 [details] [diff] [review]
Beta_installMultipleExtensions_V1

Review of attachment 8537819 [details] [diff] [review]:
-----------------------------------------------------------------

http://hg.mozilla.org/qa/mozmill-tests/rev/a152ddb1c07c (beta)
Attachment #8537819 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537819 - Flags: review?(andreea.matei)
Attachment #8537819 - Flags: review+
We decided to let these refactoring changes ride the trains.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: