← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~michael.nelson/launchpad/561586-qa-fail into lp:launchpad/devel

 

Michael Nelson has proposed merging lp:~michael.nelson/launchpad/561586-qa-fail into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #561586 Move javascript code to lp.app directories
  https://bugs.launchpad.net/bugs/561586


Overview
========

This branch fixes a qa-fail for my previous MP:

https://code.edge.launchpad.net/~michael.nelson/launchpad/561586-move-js-to-lp-app/+merge/32180

which moved the soyuz Javascript, and updated the module names.

When accessing the page:
https://launchpad.dev/~cprov/+archive/ppa/+packages

the expandable source packages are not working in devel. This branch tests and fixes that.

Details
=======
It was just another instance of the old module name (soyuz-base) that I should have found with the previous branch.

To test
=======
bin/test -vvt test_sources_extra_available
-- 
https://code.launchpad.net/~michael.nelson/launchpad/561586-qa-fail/+merge/32745
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~michael.nelson/launchpad/561586-qa-fail into lp:launchpad/devel.
=== modified file 'lib/lp/soyuz/templates/archive-macros.pt'
--- lib/lp/soyuz/templates/archive-macros.pt	2010-05-28 19:47:23 +0000
+++ lib/lp/soyuz/templates/archive-macros.pt	2010-08-16 10:34:42 +0000
@@ -10,7 +10,7 @@
   </tal:comment>
 
 <script type="text/javascript">
-LPS.use('node', 'io-base', 'lazr.anim', 'soyuz-base', function(Y) {
+LPS.use('node', 'io-base', 'lazr.anim', 'lp.soyuz.base', function(Y) {
 
 
 /*
@@ -23,7 +23,7 @@
         startUpdate(args.container);
     };
 
-    var failure_message = Y.soyuz.makeFailureNode(
+    var failure_message = Y.lp.soyuz.base.makeFailureNode(
         'Failed to fetch package details.', retry_handler);
 
     args.container.set('innerHTML', '');
@@ -48,7 +48,7 @@
  * Dispatch a XHR for updating the given container.
  */
 function startUpdate(container) {
-    in_progress_message = Y.soyuz.makeInProgressNode(
+    in_progress_message = Y.lp.soyuz.base.makeInProgressNode(
         'Fetching package details ...')
 
     container.set('innerHTML', '');

=== added file 'lib/lp/soyuz/windmill/tests/test_archive_packages.py'
--- lib/lp/soyuz/windmill/tests/test_archive_packages.py	1970-01-01 00:00:00 +0000
+++ lib/lp/soyuz/windmill/tests/test_archive_packages.py	2010-08-16 10:34:42 +0000
@@ -0,0 +1,28 @@
+# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+from canonical.launchpad.windmill.testing import constants
+from lp.soyuz.windmill.testing import SoyuzWindmillLayer
+from lp.testing import WindmillTestCase
+
+
+class TestArchivePackagesSourcesExtra(WindmillTestCase):
+    """Each listed source package can be expanded for extra information."""
+
+    layer = SoyuzWindmillLayer
+
+    def test_sources_extra_available(self):
+        """A successful request for the extra info updates the display."""
+
+        self.client.open(
+            url='http://launchpad.dev:8085/~cprov/+archive/ppa/+packages')
+        self.client.waits.forPageLoad(timeout=constants.PAGE_LOAD)
+
+        self.client.click(id="pub29-expander")
+
+        self.client.waits.forElement(
+            xpath=u'//div[@id="pub29-container"]//a[text()="i386"]',
+            timeout=constants.FOR_ELEMENT)
+
+
+