diff options
| author | Tom Carrick <tom@carrick.eu> | 2023-11-23 17:37:37 +0100 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2023-11-30 17:09:55 -0300 |
| commit | 471fa926eaa1bb9270e0b0ad0cd8bdd93ea6f88f (patch) | |
| tree | 0b095e3511a7236e40c9502062d00b03fcbf9cc0 /js_tests/admin | |
| parent | 9fe12b0f364b18926ef52587d4dbe2b2901b2b98 (diff) | |
[5.0.x] Fixed #34995 -- Improved position of related widget's add link on admin pages on small screens.
Regression in 1699f8b52ac15f687cc39088401c2641022c71cd.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
Backport of 999ba9db6d6331eaa58af77debba42754bcc1a8e from main
Diffstat (limited to 'js_tests/admin')
| -rw-r--r-- | js_tests/admin/SelectFilter2.test.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js_tests/admin/SelectFilter2.test.js b/js_tests/admin/SelectFilter2.test.js index 387bfd669c..0b1317cff5 100644 --- a/js_tests/admin/SelectFilter2.test.js +++ b/js_tests/admin/SelectFilter2.test.js @@ -5,9 +5,13 @@ QUnit.module('admin.SelectFilter2'); QUnit.test('init', function(assert) { const $ = django.jQuery; - $('<form><select id="id"></select></form>').appendTo('#qunit-fixture'); - $('<option value="0">A</option>').appendTo('#id'); + $('<form id="test"></form>').appendTo('#qunit-fixture'); + $('<label for="id_id">Test</label>').appendTo('#test'); + $('<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.equal($('.selector-available h2').text().trim(), "Available things"); assert.equal($('.selector-chosen h2').text().trim(), "Chosen things"); assert.equal($('.selector-chosen select')[0].getAttribute('multiple'), ''); |
