mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #23262 -- Made SelectFilter2.js move items on enter Key press.
This commit is contained in:
committed by
Tim Graham
parent
2cc8ffe258
commit
85c22dd4c4
@@ -942,6 +942,17 @@ class HorizontalVerticalFilterSeleniumFirefoxTests(AdminSeleniumWebDriverTestCas
|
||||
self.assertSelectOptions(to_box,
|
||||
[str(self.peter.id), str(self.jason.id)])
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Check that pressing enter on a filtered option sends it properly
|
||||
# to the 'to' box.
|
||||
self.get_select_option(to_box, str(self.jason.id)).click()
|
||||
self.selenium.find_element_by_css_selector(remove_link).click()
|
||||
input.send_keys('ja')
|
||||
self.assertSelectOptions(from_box, [str(self.jason.id)])
|
||||
input.send_keys([Keys.ENTER])
|
||||
self.assertSelectOptions(to_box, [str(self.peter.id), str(self.jason.id)])
|
||||
input.send_keys([Keys.BACK_SPACE, Keys.BACK_SPACE])
|
||||
|
||||
# Save and check that everything is properly stored in the database ---
|
||||
self.selenium.find_element_by_xpath('//input[@value="Save"]').click()
|
||||
self.wait_page_loaded()
|
||||
|
||||
Reference in New Issue
Block a user