summaryrefslogtreecommitdiff
path: root/js_tests
diff options
context:
space:
mode:
authorDani Fornons <fornons@gmail.com>2025-11-10 10:21:46 +0100
committerJacob Walls <jacobtylerwalls@gmail.com>2025-11-11 16:31:16 -0500
commit6821a7c9904861bf1381383b95ed85ff49d9ee5d (patch)
treede994deb3a5324e2c82cc08836f1ef544f9a01ef /js_tests
parent2b0f24e6223bf7e294fba63741f58eb7b0bf49ff (diff)
Fixed #36053 -- Fixed placement of FilteredSelectMultiple widget label.
Diffstat (limited to 'js_tests')
-rw-r--r--js_tests/admin/SelectFilter2.test.js7
1 files changed, 5 insertions, 2 deletions
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) {
$('<div class="helptext">This is helpful.</div>').appendTo('#test');
$('<select id="id"><option value="0">A</option></select>').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");