diff options
author | David Sanders <dsanders11@ucsbalum.com> | 2016-05-03 10:09:07 -0700 |
---|---|---|
committer | Simon Charette <charettes@users.noreply.github.com> | 2016-05-03 13:09:07 -0400 |
commit | e00d77c4834b40f06f9bf271da5fdfb526ad8f56 (patch) | |
tree | 8d5c22f362ffe9a541724d3742982b373a3c16d1 /tests/admin_widgets/tests.py | |
parent | c9c5ccbd413332aafb45c47749fb6e8ede70eef4 (diff) | |
download | django-e00d77c4834b40f06f9bf271da5fdfb526ad8f56.tar.gz |
Fixed #26575 -- Disabled SelectFilter buttons when inactive.
Diffstat (limited to 'tests/admin_widgets/tests.py')
-rw-r--r-- | tests/admin_widgets/tests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 058f303016..9c3c7b09b0 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -966,6 +966,32 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase): str(self.arthur.id), str(self.cliff.id), ]) + # Choose some more options -------------------------------------------- + self.get_select_option(from_box, str(self.peter.id)).click() + self.get_select_option(from_box, str(self.lisa.id)).click() + + # Confirm they're selected after clicking inactive buttons: ticket #26575 + self.assertSelectedOptions(from_box, [str(self.peter.id), str(self.lisa.id)]) + self.selenium.find_element_by_id(remove_link).click() + self.assertSelectedOptions(from_box, [str(self.peter.id), str(self.lisa.id)]) + + # Unselect the options ------------------------------------------------ + self.get_select_option(from_box, str(self.peter.id)).click() + self.get_select_option(from_box, str(self.lisa.id)).click() + + # Choose some more options -------------------------------------------- + self.get_select_option(to_box, str(self.jason.id)).click() + self.get_select_option(to_box, str(self.john.id)).click() + + # Confirm they're selected after clicking inactive buttons: ticket #26575 + self.assertSelectedOptions(to_box, [str(self.jason.id), str(self.john.id)]) + self.selenium.find_element_by_id(choose_link).click() + self.assertSelectedOptions(to_box, [str(self.jason.id), str(self.john.id)]) + + # Unselect the options ------------------------------------------------ + self.get_select_option(to_box, str(self.jason.id)).click() + self.get_select_option(to_box, str(self.john.id)).click() + def test_basic(self): self.school.students.set([self.lisa, self.peter]) self.school.alumni.set([self.lisa, self.peter]) |