[Testbot] Plone 5.0 - Python 2.7 - Build # 1320 - Still failing! - 1 failure(s)

jenkins at plone.org jenkins at plone.org
Tue Jan 28 23:51:31 UTC 2014


This commit violated the Plone Continous Integration rule "Don’t Check In on a Broken Build": https://buildoutcoredev.readthedocs.org/en/latest/continous-integration.html#dont-check-in-on-a-broken-build

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

-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 1320 - Still Failing!
-------------------------------------------------------------------------------

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


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

Repository: mockup
Branch: refs/heads/master
Date: 2014-01-28T13:20:59-08:00
Author: Nathan Van Gheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/mockup/commit/2a5c3e33d32ed52dab22a1c8fbe772cc223f2bc2

 Fix toolbar styles and modals with structure

Files changed:
A tests/pattern-sortable-test.js
M js/config.js
M js/patterns/formunloadalert.js
M js/patterns/modal.js
M js/patterns/sortable.js
M js/patterns/structure/views/addmenu.js
M js/patterns/structure/views/app.js
M js/patterns/structure/views/table.js
M js/patterns/structure/views/textfilter.js
M less/pattern.structure.less
M less/toolbar.less
M lib/jquery.event.drop.js
M tests/pattern-structure-test.js

diff --git a/js/config.js b/js/config.js
index ce553d3..ac29c1d 100644
--- a/js/config.js
+++ b/js/config.js
@@ -96,7 +96,10 @@ var requirejsOptions = {
     'jqtree': { deps: ['jquery'] },
     'jquery.cookie': { deps: ['jquery'] },
     'jquery.event.drag': { deps: ['jquery'] },
-    'jquery.event.drop': { deps: ['jquery'] },
+    'jquery.event.drop': {
+      deps: ['jquery'],
+      exports: '$.drop'
+    },
     'mockup-iframe_init': { deps: ['domready'] },
     'picker.date': { deps: [ 'picker' ] },
     'picker.time': { deps: [ 'picker' ] },
diff --git a/js/patterns/formunloadalert.js b/js/patterns/formunloadalert.js
index 6c8f116..29b7380 100644
--- a/js/patterns/formunloadalert.js
+++ b/js/patterns/formunloadalert.js
@@ -74,8 +74,11 @@ define([
 
       var $modal = self.$el.parents('.modal');
       if ($modal.size() !== 0) {
-        $modal.data('pattern-modal').on('hide', function(e, modal) {
-          modal._suppressHide = self._handle_unload.apply(self, e);
+        $modal.data('pattern-modal').on('hide', function(e) {
+          var modal = $modal.data('pattern-modal');
+          if(modal){
+            modal._suppressHide = self._handle_unload.apply(self, e);
+          }
         });
       } else {
         $(window).on('beforeunload', function(e){
diff --git a/js/patterns/modal.js b/js/patterns/modal.js
index 5e070b4..4499273 100644
--- a/js/patterns/modal.js
+++ b/js/patterns/modal.js
@@ -843,6 +843,11 @@ define([
         self.ajaxXHR.abort();
       }
       self.trigger('hide');
+      if(self._suppressHide){
+        if(!confirm(self._suppressHide)){
+          return;
+        }
+      }
       if ($('.modal', self.$wrapper).size() < 2) {
         self.backdrop.hide();
         self.$wrapper.hide();
diff --git a/js/patterns/sortable.js b/js/patterns/sortable.js
index 6dbe7d1..8d65b7e 100644
--- a/js/patterns/sortable.js
+++ b/js/patterns/sortable.js
@@ -64,7 +64,7 @@ define([
   'mockup-patterns-base',
   'jquery.event.drag',
   'jquery.event.drop'
-], function($, Base) {
+], function($, Base, drag, drop) {
   "use strict";
 
   var SortablePattern = Base.extend({
@@ -82,7 +82,7 @@ define([
       self.$el.find(self.options.selector).drag('start', function(e, dd) {
         var dragged = this;
         $(dragged).addClass(self.options.dragClass);
-        $.drop({
+        drop({
           tolerance: function(event, proxy, target) {
             if($(target.elem).closest(self.$el).length === 0){
               /* prevent dragging conflict over another drag area */
diff --git a/js/patterns/structure/views/addmenu.js b/js/patterns/structure/views/addmenu.js
index 14fb09b..bc3aa77 100644
--- a/js/patterns/structure/views/addmenu.js
+++ b/js/patterns/structure/views/addmenu.js
@@ -96,6 +96,9 @@ define([
                   }
                   modal.$loading.hide();
                 },
+                onError: function(){
+                  alert('error on form');
+                }
               },
               'input#form-buttons-cancel, .formControls input[name="form.button.cancel"]': {
                 modalFunction: 'hide'
diff --git a/js/patterns/structure/views/app.js b/js/patterns/structure/views/app.js
index d9b6b61..7036ed1 100644
--- a/js/patterns/structure/views/app.js
+++ b/js/patterns/structure/views/app.js
@@ -391,6 +391,19 @@ define([
         });
         items.push(self.buttons[group[0]]);
       });
+      if(self.options.uploadUrl){
+        var uploadBtn = new ButtonView({
+          title: 'Upload',
+          context: 'success',
+          icon: 'upload'
+        });
+        items.push(uploadBtn);
+        uploadBtn.on('button:click', function(){
+          // update because the url can change depending on the folder we're in.
+          self.dropzone.options.url = self.getAjaxUrl(self.options.uploadUrl);
+          self.dropzone.hiddenFileInput.click();
+        });
+      }
       items.push(new TextFilterView({
         id: 'filter',
         app: this
@@ -431,7 +444,7 @@ define([
         type = 'warning';
       }
       this.statusType = type;
-      this.$('td.status').addClass(type).html(txt);
+      this.$('.status').addClass(type).html(txt);
     },
     render: function(){
       var self = this;
@@ -452,18 +465,6 @@ define([
 
       /* dropzone support */
       if(self.options.uploadUrl){
-        /* add upload button to toolbar */
-        var uploadBtn = new ButtonView({
-          title: 'Upload',
-          context: 'success',
-          icon: 'upload'
-        });
-        self.toolbar.$el.append(uploadBtn.render().el);
-        uploadBtn.on('button:click', function(){
-          // update because the url can change depending on the folder we're in.
-          self.dropzone.options.url = self.getAjaxUrl(self.options.uploadUrl);
-          self.dropzone.hiddenFileInput.click();
-        });
         self.dropzone = new DropZone(self.$el, {
           className: 'structure-dropzone',
           //clickable: false,
@@ -471,7 +472,7 @@ define([
           url: self.getAjaxUrl(self.options.uploadUrl),
           autoCleanResults: true,
           useTus: self.options.useTus,
-          success: function(e, data){
+          success: function(){
             self.collection.pager();
           }
         }).dropzone;
diff --git a/js/patterns/structure/views/table.js b/js/patterns/structure/views/table.js
index ccb67ab..7de4865 100644
--- a/js/patterns/structure/views/table.js
+++ b/js/patterns/structure/views/table.js
@@ -69,8 +69,7 @@ define([
     },
     events: {
       'click .breadcrumbs a': 'breadcrumbClicked',
-      'change .select-all': 'selectAll',
-      // 'change tbody input[type="checkbox"]': 'toggleSelectAll'
+      'change .select-all': 'selectAll'
     },
     render: function() {
       var self = this;
@@ -122,7 +121,7 @@ define([
     },
     selectAll: function(e) {
       if ($(e.target).is(':checked')) {
-        $('input[type="checkbox"]', $('tbody')).attr('checked', 'checked').change();
+        $('input[type="checkbox"]', this.$('tbody')).attr('checked', 'checked').change();
       } else {
         this.selectedCollection.remove(this.collection.models);
       }
diff --git a/js/patterns/structure/views/textfilter.js b/js/patterns/structure/views/textfilter.js
index 0f8fa39..40e658c 100644
--- a/js/patterns/structure/views/textfilter.js
+++ b/js/patterns/structure/views/textfilter.js
@@ -36,7 +36,7 @@ define([
 
   var TextFilterView = BaseView.extend({
     tagName: 'div',
-    className: 'navbar-search form-search col-md-3 col-md-offset-9',
+    className: 'navbar-search form-search ui-offset-parent',
     template: _.template(
       '<div class="input-group">' +
         '<input type="text" class="form-control search-query" placeholder="Filter">' +
diff --git a/less/pattern.structure.less b/less/pattern.structure.less
index 5b26505..340d83a 100644
--- a/less/pattern.structure.less
+++ b/less/pattern.structure.less
@@ -47,8 +47,12 @@
     }
     .alert.status{
         margin-bottom: 5px;
-        height: 14px;
-        padding: 8px;
+        padding: 5px;
+    }
+
+    #filter{
+        max-width: 400px;
+        float: right;
     }
 }
 
diff --git a/less/toolbar.less b/less/toolbar.less
index 9bf2798..19fbba9 100644
--- a/less/toolbar.less
+++ b/less/toolbar.less
@@ -13,7 +13,7 @@
 @import "pattern.structure.less";
 
 @import "../bower_components/bootstrap/less/bootstrap.less";
- at icon-font-path: "@{pathPrefix}../bower_components/bootstrap/fonts/";
+ at icon-font-path: "@{pathPrefix}../bower_components/bootstrap/dist/fonts/";
 
 
 body {
@@ -41,7 +41,7 @@ body {
 .modal-wrapper { left: 15%; margin-left: 0; width: 100%; }
 .modal {
 
-  &.fade.in {
+  &.fade.in > .modal-dialog {
     margin: 0;
     width: 70%;
     top: 100px;
diff --git a/lib/jquery.event.drop.js b/lib/jquery.event.drop.js
index 7599ef9..6bb6dd2 100755
--- a/lib/jquery.event.drop.js
+++ b/lib/jquery.event.drop.js
@@ -299,4 +299,4 @@ drop = $.event.special.drop = {
 // share the same special event configuration with related events...
 $special.dropinit = $special.dropstart = $special.dropend = drop;
 
-})(jQuery); // confine scope	
\ No newline at end of file
+})(jQuery); // confine scope	
diff --git a/tests/pattern-sortable-test.js b/tests/pattern-sortable-test.js
new file mode 100644
index 0000000..4313377
--- /dev/null
+++ b/tests/pattern-sortable-test.js
@@ -0,0 +1,40 @@
+define([
+  'expect',
+  'jquery',
+  'mockup-registry',
+  'mockup-patterns-sortable'
+], function(expect, $, registry, Sortable) {
+  "use strict";
+
+  window.mocha.setup('bdd');
+  $.fx.off = true;
+
+  /* ==========================
+   TEST: Toggle
+  ========================== */
+
+  describe("Sortable", function() {
+    beforeEach(function() {
+      this.$el = $('' +
+        '<ul class="pat-sortable">' +
+          '<li>One</li>' +
+          '<li>Two</li>' +
+          '<li>Three</li>' +
+        '</ul>'
+      ).appendTo('body');
+    });
+
+    afterEach(function() {
+      this.$el.remove();
+    });
+
+    it("adds class on drag start", function() {
+      var sortable = new Sortable(this.$el);
+      var $todrag = this.$el.find('li').eq(0);
+      $todrag.trigger('dragstart');
+      expect($todrag.hasClass(sortable.options.dragClass)).to.equal(true);
+    });
+
+  });
+
+});
diff --git a/tests/pattern-structure-test.js b/tests/pattern-structure-test.js
index 8235c81..d11d54d 100644
--- a/tests/pattern-structure-test.js
+++ b/tests/pattern-structure-test.js
@@ -209,5 +209,42 @@ define([
       this.$el.find('#gen-copy').trigger('click');
       this.$el.find('#gen-paste').trigger('click');
     });
+
+    it('test button updates status', function() {
+      registry.scan(this.$el);
+      var pattern = this.$el.data('patternStructure');
+      this.clock.tick(1000);
+      var $item = this.$el.find('.itemRow td.selection input').eq(0);
+      $item[0].checked = true;
+      $item.trigger('change');
+      this.$el.find('#gen-cut').trigger('click');
+      expect(this.$el.find('.order-support .status').html()).to.contain('cut');
+    });
+
+    it('test select all', function() {
+      registry.scan(this.$el);
+      var pattern = this.$el.data('patternStructure');
+      this.clock.tick(1000);
+      var $item = this.$el.find('table th .select-all');
+      $item[0].checked = true;
+      $item.trigger('change');
+      expect(this.$el.find("#selected").html()).to.contain('15');
+
+    });
+
+    it('test unselect all', function() {
+      registry.scan(this.$el);
+      var pattern = this.$el.data('patternStructure');
+      this.clock.tick(1000);
+      var $item = this.$el.find('table th .select-all');
+      $item[0].checked = true;
+      $item.trigger('change');
+      expect(this.$el.find("#selected").html()).to.contain('15');
+      $item[0].checked = false;
+      $item.trigger('change');
+      expect(this.$el.find("#selected").html()).to.contain('0');
+
+    });
+
   });
 });


Repository: mockup
Branch: refs/heads/master
Date: 2014-01-28T14:57:12-08:00
Author: Rok Garbas (garbas) <rok at garbas.si>
Commit: https://github.com/plone/mockup/commit/6c99c146dabaca251d4b9f31ce40619d309d85b9

Merge pull request #258 from plone/vangheem-toolbar

 Fix toolbar styles and modals with structure

Files changed:
A tests/pattern-sortable-test.js
M js/config.js
M js/patterns/formunloadalert.js
M js/patterns/modal.js
M js/patterns/sortable.js
M js/patterns/structure/views/addmenu.js
M js/patterns/structure/views/app.js
M js/patterns/structure/views/table.js
M js/patterns/structure/views/textfilter.js
M less/pattern.structure.less
M less/toolbar.less
M lib/jquery.event.drop.js
M tests/pattern-structure-test.js

diff --git a/js/config.js b/js/config.js
index ce553d3..ac29c1d 100644
--- a/js/config.js
+++ b/js/config.js
@@ -96,7 +96,10 @@ var requirejsOptions = {
     'jqtree': { deps: ['jquery'] },
     'jquery.cookie': { deps: ['jquery'] },
     'jquery.event.drag': { deps: ['jquery'] },
-    'jquery.event.drop': { deps: ['jquery'] },
+    'jquery.event.drop': {
+      deps: ['jquery'],
+      exports: '$.drop'
+    },
     'mockup-iframe_init': { deps: ['domready'] },
     'picker.date': { deps: [ 'picker' ] },
     'picker.time': { deps: [ 'picker' ] },
diff --git a/js/patterns/formunloadalert.js b/js/patterns/formunloadalert.js
index 6c8f116..29b7380 100644
--- a/js/patterns/formunloadalert.js
+++ b/js/patterns/formunloadalert.js
@@ -74,8 +74,11 @@ define([
 
       var $modal = self.$el.parents('.modal');
       if ($modal.size() !== 0) {
-        $modal.data('pattern-modal').on('hide', function(e, modal) {
-          modal._suppressHide = self._handle_unload.apply(self, e);
+        $modal.data('pattern-modal').on('hide', function(e) {
+          var modal = $modal.data('pattern-modal');
+          if(modal){
+            modal._suppressHide = self._handle_unload.apply(self, e);
+          }
         });
       } else {
         $(window).on('beforeunload', function(e){
diff --git a/js/patterns/modal.js b/js/patterns/modal.js
index 5e070b4..4499273 100644
--- a/js/patterns/modal.js
+++ b/js/patterns/modal.js
@@ -843,6 +843,11 @@ define([
         self.ajaxXHR.abort();
       }
       self.trigger('hide');
+      if(self._suppressHide){
+        if(!confirm(self._suppressHide)){
+          return;
+        }
+      }
       if ($('.modal', self.$wrapper).size() < 2) {
         self.backdrop.hide();
         self.$wrapper.hide();
diff --git a/js/patterns/sortable.js b/js/patterns/sortable.js
index 6dbe7d1..8d65b7e 100644
--- a/js/patterns/sortable.js
+++ b/js/patterns/sortable.js
@@ -64,7 +64,7 @@ define([
   'mockup-patterns-base',
   'jquery.event.drag',
   'jquery.event.drop'
-], function($, Base) {
+], function($, Base, drag, drop) {
   "use strict";
 
   var SortablePattern = Base.extend({
@@ -82,7 +82,7 @@ define([
       self.$el.find(self.options.selector).drag('start', function(e, dd) {
         var dragged = this;
         $(dragged).addClass(self.options.dragClass);
-        $.drop({
+        drop({
           tolerance: function(event, proxy, target) {
             if($(target.elem).closest(self.$el).length === 0){
               /* prevent dragging conflict over another drag area */
diff --git a/js/patterns/structure/views/addmenu.js b/js/patterns/structure/views/addmenu.js
index 14fb09b..bc3aa77 100644
--- a/js/patterns/structure/views/addmenu.js
+++ b/js/patterns/structure/views/addmenu.js
@@ -96,6 +96,9 @@ define([
                   }
                   modal.$loading.hide();
                 },
+                onError: function(){
+                  alert('error on form');
+                }
               },
               'input#form-buttons-cancel, .formControls input[name="form.button.cancel"]': {
                 modalFunction: 'hide'
diff --git a/js/patterns/structure/views/app.js b/js/patterns/structure/views/app.js
index d9b6b61..7036ed1 100644
--- a/js/patterns/structure/views/app.js
+++ b/js/patterns/structure/views/app.js
@@ -391,6 +391,19 @@ define([
         });
         items.push(self.buttons[group[0]]);
       });
+      if(self.options.uploadUrl){
+        var uploadBtn = new ButtonView({
+          title: 'Upload',
+          context: 'success',
+          icon: 'upload'
+        });
+        items.push(uploadBtn);
+        uploadBtn.on('button:click', function(){
+          // update because the url can change depending on the folder we're in.
+          self.dropzone.options.url = self.getAjaxUrl(self.options.uploadUrl);
+          self.dropzone.hiddenFileInput.click();
+        });
+      }
       items.push(new TextFilterView({
         id: 'filter',
         app: this
@@ -431,7 +444,7 @@ define([
         type = 'warning';
       }
       this.statusType = type;
-      this.$('td.status').addClass(type).html(txt);
+      this.$('.status').addClass(type).html(txt);
     },
     render: function(){
       var self = this;
@@ -452,18 +465,6 @@ define([
 
       /* dropzone support */
       if(self.options.uploadUrl){
-        /* add upload button to toolbar */
-        var uploadBtn = new ButtonView({
-          title: 'Upload',
-          context: 'success',
-          icon: 'upload'
-        });
-        self.toolbar.$el.append(uploadBtn.render().el);
-        uploadBtn.on('button:click', function(){
-          // update because the url can change depending on the folder we're in.
-          self.dropzone.options.url = self.getAjaxUrl(self.options.uploadUrl);
-          self.dropzone.hiddenFileInput.click();
-        });
         self.dropzone = new DropZone(self.$el, {
           className: 'structure-dropzone',
           //clickable: false,
@@ -471,7 +472,7 @@ define([
           url: self.getAjaxUrl(self.options.uploadUrl),
           autoCleanResults: true,
           useTus: self.options.useTus,
-          success: function(e, data){
+          success: function(){
             self.collection.pager();
           }
         }).dropzone;
diff --git a/js/patterns/structure/views/table.js b/js/patterns/structure/views/table.js
index ccb67ab..7de4865 100644
--- a/js/patterns/structure/views/table.js
+++ b/js/patterns/structure/views/table.js
@@ -69,8 +69,7 @@ define([
     },
     events: {
       'click .breadcrumbs a': 'breadcrumbClicked',
-      'change .select-all': 'selectAll',
-      // 'change tbody input[type="checkbox"]': 'toggleSelectAll'
+      'change .select-all': 'selectAll'
     },
     render: function() {
       var self = this;
@@ -122,7 +121,7 @@ define([
     },
     selectAll: function(e) {
       if ($(e.target).is(':checked')) {
-        $('input[type="checkbox"]', $('tbody')).attr('checked', 'checked').change();
+        $('input[type="checkbox"]', this.$('tbody')).attr('checked', 'checked').change();
       } else {
         this.selectedCollection.remove(this.collection.models);
       }
diff --git a/js/patterns/structure/views/textfilter.js b/js/patterns/structure/views/textfilter.js
index 0f8fa39..40e658c 100644
--- a/js/patterns/structure/views/textfilter.js
+++ b/js/patterns/structure/views/textfilter.js
@@ -36,7 +36,7 @@ define([
 
   var TextFilterView = BaseView.extend({
     tagName: 'div',
-    className: 'navbar-search form-search col-md-3 col-md-offset-9',
+    className: 'navbar-search form-search ui-offset-parent',
     template: _.template(
       '<div class="input-group">' +
         '<input type="text" class="form-control search-query" placeholder="Filter">' +
diff --git a/less/pattern.structure.less b/less/pattern.structure.less
index 5b26505..340d83a 100644
--- a/less/pattern.structure.less
+++ b/less/pattern.structure.less
@@ -47,8 +47,12 @@
     }
     .alert.status{
         margin-bottom: 5px;
-        height: 14px;
-        padding: 8px;
+        padding: 5px;
+    }
+
+    #filter{
+        max-width: 400px;
+        float: right;
     }
 }
 
diff --git a/less/toolbar.less b/less/toolbar.less
index 9bf2798..19fbba9 100644
--- a/less/toolbar.less
+++ b/less/toolbar.less
@@ -13,7 +13,7 @@
 @import "pattern.structure.less";
 
 @import "../bower_components/bootstrap/less/bootstrap.less";
- at icon-font-path: "@{pathPrefix}../bower_components/bootstrap/fonts/";
+ at icon-font-path: "@{pathPrefix}../bower_components/bootstrap/dist/fonts/";
 
 
 body {
@@ -41,7 +41,7 @@ body {
 .modal-wrapper { left: 15%; margin-left: 0; width: 100%; }
 .modal {
 
-  &.fade.in {
+  &.fade.in > .modal-dialog {
     margin: 0;
     width: 70%;
     top: 100px;
diff --git a/lib/jquery.event.drop.js b/lib/jquery.event.drop.js
index 7599ef9..6bb6dd2 100755
--- a/lib/jquery.event.drop.js
+++ b/lib/jquery.event.drop.js
@@ -299,4 +299,4 @@ drop = $.event.special.drop = {
 // share the same special event configuration with related events...
 $special.dropinit = $special.dropstart = $special.dropend = drop;
 
-})(jQuery); // confine scope	
\ No newline at end of file
+})(jQuery); // confine scope	
diff --git a/tests/pattern-sortable-test.js b/tests/pattern-sortable-test.js
new file mode 100644
index 0000000..4313377
--- /dev/null
+++ b/tests/pattern-sortable-test.js
@@ -0,0 +1,40 @@
+define([
+  'expect',
+  'jquery',
+  'mockup-registry',
+  'mockup-patterns-sortable'
+], function(expect, $, registry, Sortable) {
+  "use strict";
+
+  window.mocha.setup('bdd');
+  $.fx.off = true;
+
+  /* ==========================
+   TEST: Toggle
+  ========================== */
+
+  describe("Sortable", function() {
+    beforeEach(function() {
+      this.$el = $('' +
+        '<ul class="pat-sortable">' +
+          '<li>One</li>' +
+          '<li>Two</li>' +
+          '<li>Three</li>' +
+        '</ul>'
+      ).appendTo('body');
+    });
+
+    afterEach(function() {
+      this.$el.remove();
+    });
+
+    it("adds class on drag start", function() {
+      var sortable = new Sortable(this.$el);
+      var $todrag = this.$el.find('li').eq(0);
+      $todrag.trigger('dragstart');
+      expect($todrag.hasClass(sortable.options.dragClass)).to.equal(true);
+    });
+
+  });
+
+});
diff --git a/tests/pattern-structure-test.js b/tests/pattern-structure-test.js
index 8235c81..d11d54d 100644
--- a/tests/pattern-structure-test.js
+++ b/tests/pattern-structure-test.js
@@ -209,5 +209,42 @@ define([
       this.$el.find('#gen-copy').trigger('click');
       this.$el.find('#gen-paste').trigger('click');
     });
+
+    it('test button updates status', function() {
+      registry.scan(this.$el);
+      var pattern = this.$el.data('patternStructure');
+      this.clock.tick(1000);
+      var $item = this.$el.find('.itemRow td.selection input').eq(0);
+      $item[0].checked = true;
+      $item.trigger('change');
+      this.$el.find('#gen-cut').trigger('click');
+      expect(this.$el.find('.order-support .status').html()).to.contain('cut');
+    });
+
+    it('test select all', function() {
+      registry.scan(this.$el);
+      var pattern = this.$el.data('patternStructure');
+      this.clock.tick(1000);
+      var $item = this.$el.find('table th .select-all');
+      $item[0].checked = true;
+      $item.trigger('change');
+      expect(this.$el.find("#selected").html()).to.contain('15');
+
+    });
+
+    it('test unselect all', function() {
+      registry.scan(this.$el);
+      var pattern = this.$el.data('patternStructure');
+      this.clock.tick(1000);
+      var $item = this.$el.find('table th .select-all');
+      $item[0].checked = true;
+      $item.trigger('change');
+      expect(this.$el.find("#selected").html()).to.contain('15');
+      $item[0].checked = false;
+      $item.trigger('change');
+      expect(this.$el.find("#selected").html()).to.contain('0');
+
+    });
+
   });
 });




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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 23306 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140128/894fee8f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 131680 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140128/894fee8f/attachment-0003.obj>


More information about the Testbot mailing list