[Testbot] Plone 5.0 - Python 2.7 - Build # 4030 - Fixed! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Sat Jan 24 12:07:25 UTC 2015


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 4030 - Fixed!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/4030/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: mockup
Branch: refs/heads/master
Date: 2015-01-24T05:36:45-06:00
Author: vangheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/mockup/commit/dfad2c986f74d0d66c977723bbef9352f716f588

fix auto focus test failures

Files changed:
M mockup/patterns/formautofocus/pattern.js
M mockup/tests/pattern-formautofocus-test.js

diff --git a/mockup/patterns/formautofocus/pattern.js b/mockup/patterns/formautofocus/pattern.js
index 43b62f4..8e41ec1 100644
--- a/mockup/patterns/formautofocus/pattern.js
+++ b/mockup/patterns/formautofocus/pattern.js
@@ -29,9 +29,9 @@ define([
     init: function() {
       var self = this;
       if ($(self.options.condition, self.$el).size() !== 0) {
-        $(self.options.target, self.$el).focus();
+        $(self.options.target, self.$el).focusin();
       } else {
-        $(self.options.always, self.$el).focus();
+        $(self.options.always, self.$el).focusin();
       }
 
     }
diff --git a/mockup/tests/pattern-formautofocus-test.js b/mockup/tests/pattern-formautofocus-test.js
index 406db72..9f8d3de 100644
--- a/mockup/tests/pattern-formautofocus-test.js
+++ b/mockup/tests/pattern-formautofocus-test.js
@@ -46,7 +46,7 @@ define([
         '</div>')
         .appendTo('body');
       expect($('input#first-input').is(':focus')).to.be.equal(false);
-      $('input').on('focus', function() {
+      $('input').on('focusin', function() {
         expect($(this).attr('id')).to.equal('input1-inside-error');
         expect($('input#first-input-should-not-focus').is(':focus')).to.be.equal(false);
         expect($('input#input-inside-error-should-not-focus').is(':focus')).to.be.equal(false);
@@ -65,7 +65,7 @@ define([
         '</div>')
         .appendTo('body');
       expect($('input#first-input').is(':focus')).to.be.equal(false);
-      $('input').on('focus', function() {
+      $('input').on('focusin', function() {
         expect($(this).attr('id')).to.equal('first-input');
         expect($('input#first-input-should-not-focus').is(':focus')).to.be.equal(false);
         expect($('input#input-inside-error-should-not-focus').is(':focus')).to.be.equal(false);




-------------------------------------------------------------------------------


More information about the Testbot mailing list