Commit Graph

22 Commits

Author SHA1 Message Date
Marijke Luttekes 2be37b2533 Made SeleniumTests.test_inline_add_another_widgets less flaky by adding explicit wait. 2024-04-17 17:38:04 +02:00
nessita 134cde8415
Removed hard-coded expected results in SeleniumTests.test_select_multiple test.
This ensures that both tests, test_select() and test_select_multiple(),
use analogous calculations for the expected amount of results, and for
the iteration when pressing "arrow down" and waiting for the ajax call
to complete.
2023-11-28 23:06:17 +01:00
Sarah Boyce 71a813a72c
Made SeleniumTests.test_select_multiple less flaky by improving Selenium waits. 2023-10-19 16:01:52 +02:00
Mariusz Felisiak 2584783f46
Refs #9602 -- Moved AlreadyRegistered/NotRegistered exceptions to django.contrib.admin.exceptions. 2023-07-07 13:22:06 +02:00
Mariusz Felisiak f64fd47a76
Fixed #9602 -- Added AdminSite.get_model_admin().
This allows retrieving an admin class for the given model class without
using internal attributes.
2023-07-07 08:06:01 +02:00
sarahboyce 649262a406 Made some Selenium tests less flaky by adding explicit wait. 2023-07-05 09:45:50 +02:00
sarahboyce decbfa834f Made SeleniumTests.test_select_multiple less flaky by adding explicit Selenium wait. 2023-06-13 08:26:34 +02:00
django-bot 9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Carlton Gibson 2ccc0b22db Fixed #33211 -- Updated tests for Selenium 4.0.0.
Replaced deprecated `find_element[s]_by_*()` usages, in favour of
`find_element[s]()` with an explicit `By`.
2021-10-21 14:37:16 +02:00
Carlton Gibson 8fa974fcdd Refs #33211 -- Added assertCountSeleniumElements() test helper. 2021-10-21 14:37:16 +02:00
Mart Sõmermaa 9b1158a7e0 Fixed #32993 -- Added AutocompleteJsonView.serialize_result() to allow customization. 2021-08-10 07:44:37 +02:00
Johannes Maron 03d0f12c82 Fixed #32466 -- Corrected autocomplete to_field resolution for complex cases.
In MTI or ForeignKey as primary key cases, it is required to fetch the attname
from the field instance on the remote model in order to reliably resolve the
to_field_name.

Co-authored-by: Johannes Maron <info@johanneshoppe.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-03-18 11:21:23 +01:00
Johannes Maron 0b120f5d64 Refs #29138 -- Added extra tests for autocomplete FK to_field variations. 2021-03-18 11:14:18 +01:00
Mariusz Felisiak a6a94fb966
Removed unnecessary lines in test_has_view_or_change_permission_required().
AutocompleteJsonViewTests.user is already a staff member.
2021-03-10 15:37:28 +01:00
Johannes Maron 3071660acf
Fixed #29010, Fixed #29138 -- Added limit_choices_to and to_field support to autocomplete fields.
* Fixed #29010 -- Added limit_choices_to support to autocomplete fields.
* Fixed #29138 -- Allowed autocomplete fields to target a custom
  to_field rather than the PK.
2021-01-12 11:37:38 +01:00
Carlton Gibson c33eb6dcd0
Fixed #29892 -- Added explicit Selenium wait in admin autocomplete tests. 2019-11-29 14:03:22 +01:00
Federico Jaramillo Martínez 8f6860863e Fixed #30722 -- Added default rate-limiting requests to admin's Select2 widget. 2019-08-27 13:47:36 +02:00
Johannes Hoppe 00d4e6f8b5 Updated Select2 to version 4.0.7. 2019-07-10 12:31:16 +02:00
Carlton Gibson 5b73317181 Fixed #29502 -- Allowed users with the view permission to use autocomplete_fields. 2018-06-18 15:36:20 -04:00
Tim Graham 81057645f6 Fixed #28871 -- Fixed initialization of autocomplete widgets in "Add another" inlines.
Also allowed autocomplete widgets to work on AdminSites with a name other
than 'admin'.
2017-12-01 22:14:32 -05:00
Tim Graham 474bd7a5d4 Used a separate admin site for autocomplete tests. 2017-12-01 21:57:05 -05:00
Johannes Hoppe 94cd8efc50 Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00