From: Marius Olbertz Date: Sun, 2 Oct 2016 09:36:41 +0000 (+0200) Subject: Adjusted tests for Toggler because they interfered with the tests for Reveal. X-Git-Tag: v6.3-rc1~26^2~7^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87dcfee2bd9400c8ede572222a545ec436f827c1;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Adjusted tests for Toggler because they interfered with the tests for Reveal. The global [data-open] query used failed for the Reveal anchor. --- diff --git a/test/javascript/components/toggler.js b/test/javascript/components/toggler.js index 12538c17e..e55817b37 100644 --- a/test/javascript/components/toggler.js +++ b/test/javascript/components/toggler.js @@ -42,16 +42,16 @@ describe('Toggler', function() { it('adds Aria attributes to click triggers', function() { $html = $('
').appendTo('body'); - var $triggers = $(` - Open - Close - Toggle - `).appendTo('body'); + var $triggers = $(`
+ Open + Close + Toggle +
`).appendTo('body'); plugin = new Foundation.Toggler($html, {}); - $('[data-open]').should.have.attr('aria-controls', 'toggler'); - $('[data-close]').should.have.attr('aria-controls', 'toggler'); - $('[data-toggle]').should.have.attr('aria-controls', 'toggler'); + $triggers.find('[data-open]').should.have.attr('aria-controls', 'toggler'); + $triggers.find('[data-close]').should.have.attr('aria-controls', 'toggler'); + $triggers.find('[data-toggle]').should.have.attr('aria-controls', 'toggler'); $triggers.remove(); });