Closed
Bug 674220
Opened 14 years ago
Closed 7 years ago
Mozmill test for installing a multi-package xpi
Categories
(Mozilla QA Graveyard :: Mozmill Tests, defect)
Mozilla QA Graveyard
Mozmill Tests
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: AlexLakatos, Unassigned)
References
Details
Attachments
(1 file, 3 obsolete files)
7.04 KB,
patch
|
whimboo
:
review-
|
Details | Diff | Splinter Review |
Tracking of mozmill test creation for installing multi-package xpi
Litmus test: https://litmus.mozilla.org/show_test.cgi?id=17242
Reporter | ||
Updated•14 years ago
|
A Pivotal Tracker story has been created for this Bug: https://www.pivotaltracker.com/story/show/16249787
Comment 2•14 years ago
|
||
A multi-package add-on is already available in the litmus-data repository.
Reporter | ||
Comment 3•14 years ago
|
||
The elementslib.Link will change once Bug 672763 lands. Is everything else ok?
Attachment #549115 -
Flags: review?(gmealer)
Comment 4•14 years ago
|
||
Comment on attachment 549115 [details] [diff] [review]
patch v1.0
Alex, it's still Anthony who is the first reviewer of all your tests.
Attachment #549115 -
Flags: review?(gmealer) → review?(anthony.s.hughes)
Comment on attachment 549115 [details] [diff] [review]
patch v1.0
>+const SITE = "http://mozqa.com";
Please call this ADDON_DOMAIN
>+/**
>+ * Installs multipackage addons
>+ */
"Test installing a multi-package add-on"
>+++ b/tests/functional/restartTests/testAddons_installMultipackage/test2.js
testAddons_installMultipackageAddon
>+/**
>+ * Verifies the addons are installed
>+ */
"Tests post-installation of a multi-package add-on"
>+ var theme = addonsManager.getAddons({attribute: "value", value: ADDONS[0].id})[0];
Are you trying to get the first theme in the list? If so, I think we should move this into a helper method in the API. Something like addonsManager.getFirstAddon(aAddonID). What do you think?
>+ expect.ok(themeIsInstalled, "Theme has been installed");
I'd like to see the addonID integrated into the message.
Something like addonName + " theme has been installed"
>+ //Verify the addon is installed
>+ addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});
>+
>+ var addon = addonsManager.getAddons({attribute: "value", value: ADDONS[1].id})[0];
>+ var addonIsInstalled = addonsManager.isAddonInstalled({addon: addon});
>+
>+ expect.ok(addonIsInstalled, "Add-on has been installed");
Same comments as the previous two.
Attachment #549115 -
Flags: review?(anthony.s.hughes) → review-
Comment 6•14 years ago
|
||
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #5)
> >+ var theme = addonsManager.getAddons({attribute: "value", value: ADDONS[0].id})[0];
>
> Are you trying to get the first theme in the list? If so, I think we should
> move this into a helper method in the API. Something like
> addonsManager.getFirstAddon(aAddonID). What do you think?
It wouldn't be such a helpful method because:
* It limits the queries to only the ids
* It would not scale. Using an index should be the reason why a new method is immediately needed
* We dont' want to rewrite the addons module in the old system. So we would like to keep it.
Does that sound ok?
> >+ //Verify the addon is installed
> >+ addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});
This should be setCategoryById
(In reply to Henrik Skupin (:whimboo) from comment #6)
> (In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #5)
> > >+ var theme = addonsManager.getAddons({attribute: "value", value: ADDONS[0].id})[0];
> >
> > Are you trying to get the first theme in the list? If so, I think we should
> > move this into a helper method in the API. Something like
> > addonsManager.getFirstAddon(aAddonID). What do you think?
>
> It wouldn't be such a helpful method because:
>
> * It limits the queries to only the ids
> * It would not scale. Using an index should be the reason why a new method
> is immediately needed
> * We dont' want to rewrite the addons module in the old system. So we would
> like to keep it.
>
> Does that sound ok?
I can agree with this, as long as we comment the code so that it is clear what the code does. If I have to ask what the code does, chances are a newcomer will be clueless as well.
> > >+ //Verify the addon is installed
> > >+ addonsManager.setCategory({category: addonsManager.getCategoryById({id: "extension"})});
>
> This should be setCategoryById
What should? "setCategory" or "getCategoryById"?
Reporter | ||
Comment 8•14 years ago
|
||
Changed to use local addons and made the previous requested changes, where still applicable
Attachment #549115 -
Attachment is obsolete: true
Attachment #566561 -
Flags: review?(anthony.s.hughes)
Comment on attachment 566561 [details] [diff] [review]
patch v2.0
>+const LOCAL_INSTALL_FILE = "install.html?addon=extensions/multipackage.xpi"
>+const LOCAL_TEST_FOLDER = collector.addHttpResource("../../../../data/addons/");
>+const MULTIPACKAGE_URL = LOCAL_TEST_FOLDER + LOCAL_INSTALL_FILE;
No need for the LOCAL_INSTALL_FILE constant here -- just use the string.
>+const ADDON_ID = "test-empty@quality.mozilla.org";
>+const THEME_ID = "plain.theme@quality.mozilla.org";
Put the URL, ADDON_ID, and THEME_ID into an array
>+
>+function setupModule() {
>+ controller = mozmill.getBrowserController();
>+ addonsManager = new addons.AddonsManager(controller);
>+
>+ // Whitelist add localhost
>+ addons.addToWhiteList(LOCAL_TEST_FOLDER);
>+
>+ // Store the ids in persisted
>+ persisted.addonId = ADDON_ID;
>+ persisted.themeId = THEME_ID;
>+
>+ tabs.closeAllTabs(controller);
>+}
>+
>+/**
>+ * Test installing a multi-package add-on
>+ */
>+function testInstallMultipackageExtension() {
Since this "extension" contains an add-on and a theme, let's use "extension" in the naming of files, functions, and header comments.
Attachment #566561 -
Flags: review?(anthony.s.hughes) → review-
Reporter | ||
Comment 10•14 years ago
|
||
made changes as requested
Attachment #566561 -
Attachment is obsolete: true
Attachment #568361 -
Flags: review?(anthony.s.hughes)
Comment 11•14 years ago
|
||
Comment on attachment 568361 [details] [diff] [review]
patch v3.0
>+const MULTIPACKAGE = [
Call this MULTIPACKAGE_ADDON
>+ var aAddon = addonsManager.getAddons({attribute: "value", value: persisted.extension.addonId})[0];
Call this addon
>+ var aTheme = addonsManager.getAddons({attribute: "value", value: persisted.extension.themeId})[0];
Call this theme
Attachment #568361 -
Flags: review?(anthony.s.hughes) → review-
Reporter | ||
Comment 12•14 years ago
|
||
Renamed variables and const
Attachment #568361 -
Attachment is obsolete: true
Attachment #570273 -
Flags: review?(hskupin)
Comment 13•14 years ago
|
||
Comment on attachment 570273 [details] [diff] [review]
patch v4.0
>+const MULTIPACKAGE_ADDON = [
>+ {url: LOCAL_TEST_FOLDER + "install.html?addon=extensions/multipackage.xpi",
>+ addonId: "test-empty@quality.mozilla.org",
>+ themeId: "plain.theme@quality.mozilla.org"}
Similar to other tests we should install the XPI directly and make not use of the install page.
>+ // Whitelist add localhost
>+ addons.addToWhiteList(LOCAL_TEST_FOLDER);
Why the whole folder and not only the domain vs. 'localhost'?
>+function teardownModule() {
>+ addonsManager.close();
>+
>+ delete persisted.extension;
Please flip both lines. .close() could fail and skip the removal of the persisted property. I would even say lets skip the close call. It's really not necessary here, because it's a restart test.
>+ // Verify the addon is installed
>+ var addon = addonsManager.getAddons({attribute: "value", value: persisted.extension.addonId})[0];
>+ var addonIsInstalled = addonsManager.isAddonInstalled({addon: addon});
This is not only an add-on but explicitly an extension.
>+ expect.ok(addonIsInstalled, "Add-on " + persisted.extension.addonId + " has been installed");
Please add single quotes around the extension and theme id.
Attachment #570273 -
Flags: review?(hskupin) → review-
Comment 14•14 years ago
|
||
Also please check the expected results from the Litmus test again. It seems like we miss some parts. If those are necessary or not please clarify with Dave Townsend.
Comment 15•14 years ago
|
||
Can we get a status update on this bug?
Whiteboard: [mozmill-functional][mozmill-aom] → [mozmill-restart][mozmill-aom]
Updated•12 years ago
|
Assignee: alex.lakatos.dev → nobody
Status: ASSIGNED → NEW
Updated•12 years ago
|
Whiteboard: [mozmill-restart][mozmill-aom] → [mentor=whimboo][lang=js]
Assignee | ||
Updated•11 years ago
|
Mentor: hskupin
Whiteboard: [mentor=whimboo][lang=js] → [lang=js]
Updated•9 years ago
|
Mentor: hskupin
QA Contact: hskupin
Whiteboard: [lang=js]
Comment 16•7 years ago
|
||
Mozmill is dead, WONTFIX the remaining bugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
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
•