From 4b5eb3ca5166f959815c626af5587b9192336ef5 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Tue, 27 Apr 2021 23:02:22 -0500 Subject: Backport #33634 (#33649) Dropdown: support `.dropdown-item` wrapped in `
  • ` tags --- js/tests/unit/tab.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index a0c4ddf15..9c9b286f0 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -345,6 +345,28 @@ $(function () { assert.notOk($tabs.find('li:last-child .dropdown-menu a:first-child').hasClass('active')) }) + QUnit.test('should support li > .dropdown-item', function (assert) { + assert.expect(2) + var tabsHTML = [ + '' + ].join('') + var $tabs = $(tabsHTML).appendTo('#qunit-fixture') + + $tabs.find('.dropdown-item').trigger('click') + assert.ok($tabs.find('.dropdown-item').hasClass('active')) + assert.notOk($tabs.find('.nav-link:not(.dropdown-toggle)').hasClass('active')) + }) + QUnit.test('Nested tabs', function (assert) { assert.expect(2) var done = assert.async() -- cgit v1.2.3