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

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: no longer in the source branch.
Merged at revision: 11353
Proposed branch: lp:~michael.nelson/launchpad/561586-qa-fail
Merge into: lp:launchpad
Diff against target: 60 lines (+28/-3)
2 files modified
lib/lp/soyuz/templates/archive-macros.pt (+3/-3)
lib/lp/soyuz/windmill/tests/test_archive_packages.py (+25/-0)
To merge this branch: bzr merge lp:~michael.nelson/launchpad/561586-qa-fail
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Approve
Review via email: mp+32745@code.launchpad.net

Commit message

Tests and fixes recently broken JS on PPA packages page.

Description of the change

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

To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) wrote :

Thanks!

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/templates/archive-macros.pt'
2--- lib/lp/soyuz/templates/archive-macros.pt 2010-05-28 19:47:23 +0000
3+++ lib/lp/soyuz/templates/archive-macros.pt 2010-08-16 14:18:47 +0000
4@@ -10,7 +10,7 @@
5 </tal:comment>
6
7 <script type="text/javascript">
8-LPS.use('node', 'io-base', 'lazr.anim', 'soyuz-base', function(Y) {
9+LPS.use('node', 'io-base', 'lazr.anim', 'lp.soyuz.base', function(Y) {
10
11
12 /*
13@@ -23,7 +23,7 @@
14 startUpdate(args.container);
15 };
16
17- var failure_message = Y.soyuz.makeFailureNode(
18+ var failure_message = Y.lp.soyuz.base.makeFailureNode(
19 'Failed to fetch package details.', retry_handler);
20
21 args.container.set('innerHTML', '');
22@@ -48,7 +48,7 @@
23 * Dispatch a XHR for updating the given container.
24 */
25 function startUpdate(container) {
26- in_progress_message = Y.soyuz.makeInProgressNode(
27+ in_progress_message = Y.lp.soyuz.base.makeInProgressNode(
28 'Fetching package details ...')
29
30 container.set('innerHTML', '');
31
32=== added file 'lib/lp/soyuz/windmill/tests/test_archive_packages.py'
33--- lib/lp/soyuz/windmill/tests/test_archive_packages.py 1970-01-01 00:00:00 +0000
34+++ lib/lp/soyuz/windmill/tests/test_archive_packages.py 2010-08-16 14:18:47 +0000
35@@ -0,0 +1,25 @@
36+# Copyright 2010 Canonical Ltd. This software is licensed under the
37+# GNU Affero General Public License version 3 (see the file LICENSE).
38+
39+from canonical.launchpad.windmill.testing import constants
40+from lp.soyuz.windmill.testing import SoyuzWindmillLayer
41+from lp.testing import WindmillTestCase
42+
43+
44+class TestArchivePackagesSourcesExtra(WindmillTestCase):
45+ """Each listed source package can be expanded for extra information."""
46+
47+ layer = SoyuzWindmillLayer
48+
49+ def test_sources_extra_available(self):
50+ """A successful request for the extra info updates the display."""
51+
52+ self.client.open(
53+ url='http://launchpad.dev:8085/~cprov/+archive/ppa/+packages')
54+ self.client.waits.forPageLoad(timeout=constants.PAGE_LOAD)
55+
56+ self.client.click(id="pub29-expander")
57+
58+ self.client.waits.forElement(
59+ xpath=u'//div[@id="pub29-container"]//a[text()="i386"]',
60+ timeout=constants.FOR_ELEMENT)