Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
0cc32a8f
Kaydet (Commit)
0cc32a8f
authored
Ara 02, 2015
tarafından
elky
Kaydeden (comit)
Tim Graham
Ock 06, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #22955 -- Added test for admin's many-to-many widget refresh data loss bug.
This was fixed by
4a438e40
.
üst
9f9921e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
tests.py
tests/admin_widgets/tests.py
+24
-0
No files found.
tests/admin_widgets/tests.py
Dosyayı görüntüle @
0cc32a8f
...
...
@@ -1166,6 +1166,30 @@ class HorizontalVerticalFilterSeleniumFirefoxTests(SeleniumDataMixin, AdminSelen
self
.
assertSelectOptions
(
'#id_alumni_from'
,
expected_unselected_values
)
self
.
assertSelectOptions
(
'#id_alumni_to'
,
expected_selected_values
)
def
test_refresh_page
(
self
):
"""
Horizontal and vertical filter widgets keep selected options on page
reload (#22955).
"""
self
.
school
.
students
.
add
(
self
.
arthur
,
self
.
jason
)
self
.
school
.
alumni
.
add
(
self
.
arthur
,
self
.
jason
)
self
.
admin_login
(
username
=
'super'
,
password
=
'secret'
,
login_url
=
'/'
)
change_url
=
reverse
(
'admin:admin_widgets_school_change'
,
args
=
(
self
.
school
.
id
,))
self
.
selenium
.
get
(
self
.
live_server_url
+
change_url
)
options_len
=
len
(
self
.
selenium
.
find_elements_by_css_selector
(
'#id_students_to > option'
))
self
.
assertEqual
(
options_len
,
2
)
# self.selenium.refresh() or send_keys(Keys.F5) does hard reload and
# doesn't replicate what happens when a user clicks the browser's
# 'Refresh' button.
self
.
selenium
.
execute_script
(
"location.reload()"
)
self
.
wait_page_loaded
()
options_len
=
len
(
self
.
selenium
.
find_elements_by_css_selector
(
'#id_students_to > option'
))
self
.
assertEqual
(
options_len
,
2
)
class
HorizontalVerticalFilterSeleniumChromeTests
(
HorizontalVerticalFilterSeleniumFirefoxTests
):
webdriver_class
=
'selenium.webdriver.chrome.webdriver.WebDriver'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment