]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Included feedback from PR.
authorMarius Olbertz <marius.olbertz@gmail.com>
Wed, 28 Sep 2016 19:08:35 +0000 (21:08 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Wed, 28 Sep 2016 19:08:35 +0000 (21:08 +0200)
test/javascript/components/accordion.js

index e7edbefec16ece9bf40568f6f45ac56e26bdbe15..b5a10f4f29cf428776f3b656416c5b0f54a2ee8f 100644 (file)
@@ -118,25 +118,25 @@ describe('Accordion', function() {
   });
 
   describe('toggle()', function() {
-    it('closes the open container if allowAllClosed is true', function() {
+    it('closes the only open container if allowAllClosed is true', function() {
       $html = $(template).appendTo('body');
       plugin = new Foundation.Accordion($html, {allowAllClosed: true});
 
-      plugin.toggle($html.find('.accordion-content').eq(1));
-      $html.find('.accordion-content').eq(1).should.have.attr('aria-hidden', 'false');
+      plugin.toggle($html.find('.accordion-content').eq(0));
+      $html.find('.accordion-content').eq(0).should.have.attr('aria-hidden', 'true');
       $html.on('up.zf.accordion', function() {
         $html.find('.accordion-content').eq(0).should.be.hidden;
         done();
       });
     });
 
-    it('not closes the open container if allowAllClosed is false', function() {
+    it('not closes the only open container if allowAllClosed is false', function() {
       $html = $(template).appendTo('body');
       plugin = new Foundation.Accordion($html, {allowAllClosed: false});
 
-      plugin.toggle($html.find('.accordion-content').eq(1));
-      $html.find('.accordion-content').eq(1).should.be.visible;
-      $html.find('.accordion-content').eq(1).should.have.attr('aria-hidden', 'false');
+      plugin.toggle($html.find('.accordion-content').eq(0));
+      $html.find('.accordion-content').eq(0).should.be.visible;
+      $html.find('.accordion-content').eq(0).should.have.attr('aria-hidden', 'false');
     });
   });
 });
\ No newline at end of file