Closed Bug 1109040 Opened 10 years ago Closed 9 years ago

Refactor testAddons_installWithoutEULA from multiple files into a single file

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

Version 3
defect
Not set
normal

Tracking

(firefox37 fixed)

RESOLVED FIXED
Tracking Status
firefox37 --- fixed

People

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

References

Details

(Whiteboard: [sprint])

Attachments

(1 file, 2 obsolete files)

Combined two tests from testAddons_installWithoutEula into one test.
Attached patch patch_V1 (obsolete) — Splinter Review
Attachment #8533685 - Flags: review?(mihaela.velimiroviciu)
Attachment #8533685 - Flags: review?(andreea.matei)
Comment on attachment 8533685 [details] [diff] [review]
patch_V1

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

You should also remove these lines from firefox/tests/remote/restartTests/manifest.ini:
[include:testAddons_InstallAddonWithoutEULA/manifest.ini]
disabled = Bug 1103869 - Test failure 'Notification popup state has been opened'

::: firefox/tests/remote/testAddons/testInstallAddonWithoutEula.js
@@ +5,5 @@
>  "use strict";
>  
>  // Include required modules
> +var addons = require("../../../../lib/addons");
> +var browser = require("../../../lib/ui/browser");

Being an UI lib, browser should be at the end, with a blank line before it

@@ +67,1 @@
>  /**

Add a blank line before this comment

@@ +92,5 @@
>    }, {type: "notification"});
>  
>    md.waitForDialog(TIMEOUT_DOWNLOAD);
>  }
> +/**

Please add a blank line before this
Attachment #8533685 - Flags: review?(mihaela.velimiroviciu)
Attachment #8533685 - Flags: review?(andreea.matei)
Attachment #8533685 - Flags: review-
Attached patch patch_V2 (obsolete) — Splinter Review
Changes requested were added.
Attachment #8533685 - Attachment is obsolete: true
Attachment #8543951 - Flags: review?(mihaela.velimiroviciu)
Attachment #8543951 - Flags: review?(andreea.matei)
Comment on attachment 8543951 [details] [diff] [review]
patch_V2

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

Looks good now, thanks!
Attachment #8543951 - Flags: review?(mihaela.velimiroviciu)
Attachment #8543951 - Flags: review?(andreea.matei)
Attachment #8543951 - Flags: review+
Attachment #8543951 - Flags: checkin?(andreea.matei)
Comment on attachment 8543951 [details] [diff] [review]
patch_V2

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

Mihaela, you are not a peer, so we still need the final review from at least Andreea.
Attachment #8543951 - Flags: checkin?(andreea.matei) → review?(andreea.matei)
Comment on attachment 8543951 [details] [diff] [review]
patch_V2

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

::: firefox/tests/remote/testAddons/testInstallAddonWithoutEula.js
@@ +64,3 @@
>  
> +  addons.resetDiscoveryPaneURL();
> +  aModule.controller.stopApplication(true);

closeAllTabs is missing, which was in the previous test.

@@ +100,4 @@
>  }
> +
> +/**
> + * Test install addon without EULA and check if the addon is correctly instaled

nit: installed

@@ +101,5 @@
> +
> +/**
> + * Test install addon without EULA and check if the addon is correctly instaled
> + */
> +function testInstallAddonWithoutEULA() {

Hm. Actually, this method is not installing the addon but it checks if it remained installed after the restart. Lets rename this and the comment above.
Attachment #8543951 - Flags: review?(andreea.matei) → review-
Attached patch patch_V3Splinter Review
Updated patch.Changes requested were added. Thanks, Andreea for your reviews :).
Attachment #8543951 - Attachment is obsolete: true
Attachment #8544613 - Flags: review?(andreea.matei)
Comment on attachment 8544613 [details] [diff] [review]
patch_V3

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

http://hg.mozilla.org/qa/mozmill-tests/rev/a14207da4ba5 (defauly)
Thanks Daniela!
Attachment #8544613 - Flags: review?(andreea.matei)
Attachment #8544613 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [sprint]
Comment on attachment 8544613 [details] [diff] [review]
patch_V3

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

::: firefox/tests/remote/testAddons/testInstallAddonWithoutEula.js
@@ +15,4 @@
>  
>  const PREF_INSTALL_DIALOG = "security.dialog_enable_delay";
>  const PREF_XPI_WHITELIST = "xpinstall.whitelist.add";
> +const PREF_LAST_CATEGORY = "extensions.ui.lastCategory";

nit: wrong order of declarations.

@@ +44,5 @@
>  
> +function teardownTest(aModule) {
> +  if (addonsManager.isOpen) {
> +    addonsManager.close();
> +  }

This changes the behavior of the test! Formerly we were not closing the addon manager, so the open tab was re-used.
(In reply to Henrik Skupin (:whimboo) from comment #9)
> >  
> > +function teardownTest(aModule) {
> > +  if (addonsManager.isOpen) {
> > +    addonsManager.close();
> > +  }
> 
> This changes the behavior of the test! Formerly we were not closing the
> addon manager, so the open tab was re-used.

Previously, we had teardownModule in test1.js which was closing all tabs and in test2.js we started with addonManager.open(), that remained unchanged here. So it's the same behavior as before.
Strange. Looks like I looked that at the wrong thing. Thanks Andreaa.
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: