mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #26612 -- Fixed SelectFilter2 buttons changing URL.
This commit is contained in:
parent
996cadfa5f
commit
14c952d581
2 changed files with 11 additions and 5 deletions
|
@ -881,6 +881,8 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
|
|||
self.assertEqual(self.has_css_class(remove_all_link, 'active'), remove_all)
|
||||
|
||||
def execute_basic_operations(self, mode, field_name):
|
||||
original_url = self.selenium.current_url
|
||||
|
||||
from_box = '#id_%s_from' % field_name
|
||||
to_box = '#id_%s_to' % field_name
|
||||
choose_link = 'id_%s_add_link' % field_name
|
||||
|
@ -1014,6 +1016,9 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
|
|||
self.get_select_option(to_box, str(self.jason.id)).click()
|
||||
self.get_select_option(to_box, str(self.john.id)).click()
|
||||
|
||||
# Pressing buttons shouldn't change the URL.
|
||||
self.assertEqual(self.selenium.current_url, original_url)
|
||||
|
||||
def test_basic(self):
|
||||
self.school.students.set([self.lisa, self.peter])
|
||||
self.school.alumni.set([self.lisa, self.peter])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue