From 6821a7c9904861bf1381383b95ed85ff49d9ee5d Mon Sep 17 00:00:00 2001 From: Dani Fornons Date: Mon, 10 Nov 2025 10:21:46 +0100 Subject: Fixed #36053 -- Fixed placement of FilteredSelectMultiple widget label. --- js_tests/admin/SelectFilter2.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js_tests/admin') diff --git a/js_tests/admin/SelectFilter2.test.js b/js_tests/admin/SelectFilter2.test.js index 533c24811c..9a020d2c53 100644 --- a/js_tests/admin/SelectFilter2.test.js +++ b/js_tests/admin/SelectFilter2.test.js @@ -10,8 +10,11 @@ QUnit.test('init', function(assert) { $('
This is helpful.
').appendTo('#test'); $('').appendTo('#test'); SelectFilter.init('id', 'things', 0); - assert.equal($('#test').children().first().prop("tagName"), "DIV"); - assert.equal($('#test').children().first().attr("class"), "selector"); + assert.deepEqual( + Array.from($('#test')[0].children).map(child => child.tagName), + ["LABEL", "DIV", "DIV"] + ); + assert.equal($('.helptext')[0].nextSibling.getAttribute("class"), "selector"); assert.equal($('.selector-available label').text().trim(), "Available things"); assert.equal($('.selector-available label').attr("id"), "id_from_label"); assert.equal($('.selector-chosen label').text().trim(), "Chosen things"); -- cgit v1.3