← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/translations-windmill-testfix into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/translations-windmill-testfix into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/translations-windmill-testfix/+merge/58441

This branch fixes the two failing Windmill tests:

 - test_sourcepackage_sharing_details broke when the form was changed from Submit/Cancel buttons to the tick/cross icons. I've changed the test to use them instead.
 - test_inline_assignment_non_contributor was rather more sinister; the test caught a real bug. The feature was broken in Firefox 3, as it chokes when giving Y.Node.create a self-closing <button>. Chromium and Firefox 4 handle that case fine. We now use a separate close tag, which works fine in all three.
-- 
https://code.launchpad.net/~wgrant/launchpad/translations-windmill-testfix/+merge/58441
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/translations-windmill-testfix into lp:launchpad.
=== modified file 'lib/lp/app/javascript/picker.js'
--- lib/lp/app/javascript/picker.js	2011-04-15 08:16:32 +0000
+++ lib/lp/app/javascript/picker.js	2011-04-20 06:46:29 +0000
@@ -243,8 +243,8 @@
           '<div class="transparent important-notice-popup">',
             '<div class="validation-content-placeholder"></div>',
             '<div class="extra-form-buttons">',
-              '<button class="yes_button" type="button"/>',
-              '<button class="no_button" type="button"/>',
+              '<button class="yes_button" type="button"></button>',
+              '<button class="no_button" type="button"></button>',
             '</div>',
           '</div>',
         '</div>'].join(''));

=== modified file 'lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py'
--- lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py	2011-04-06 19:44:01 +0000
+++ lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py	2011-04-20 06:46:29 +0000
@@ -66,7 +66,7 @@
         client.click(xpath='//*[@id="translation-incomplete-picker"]/a')
         client.click(id='field.translations_usage.1')
         client.click(
-            xpath=overlay.visible_xpath + '//input[@value="Submit"]')
+            xpath=overlay.visible_xpath + '//button[@type="submit"]')
         client.waits.forElementProperty(
             id='translation-incomplete', option='className|sprite no unseen',
             timeout=FOR_ELEMENT)
@@ -74,7 +74,7 @@
             xpath='//*[@id="upstream-sync-incomplete-picker"]/a')
         client.click(id='field.translations_autoimport_mode.2')
         client.click(
-            xpath=overlay.visible_xpath + '//input[@value="Submit"]')
+            xpath=overlay.visible_xpath + '//button[@type="submit"]')
         client.waits.forElementProperty(
             id='upstream-sync-incomplete',
             option='className|sprite no unseen', timeout=FOR_ELEMENT)