From 999ba9db6d6331eaa58af77debba42754bcc1a8e Mon Sep 17 00:00:00 2001 From: Tom Carrick Date: Thu, 23 Nov 2023 17:37:37 +0100 Subject: 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> --- js_tests/admin/SelectFilter2.test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js_tests') 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; - $('
').appendTo('#qunit-fixture'); - $('').appendTo('#id'); + $('
').appendTo('#qunit-fixture'); + $('').appendTo('#test'); + $('
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.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'), ''); -- cgit v1.3