mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #26612 -- Fixed SelectFilter2 buttons changing URL.
This commit is contained in:
committed by
Tim Graham
parent
996cadfa5f
commit
14c952d581
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user