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
9b151590
Kaydet (Commit)
9b151590
authored
Tem 24, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed usage of deprecated switch_to_*() selenium methods.
üst
8568e7cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
tests.py
tests/admin_views/tests.py
+2
-2
tests.py
tests/admin_widgets/tests.py
+10
-10
No files found.
tests/admin_views/tests.py
Dosyayı görüntüle @
9b151590
...
...
@@ -3724,7 +3724,7 @@ class SeleniumAdminViewsFirefoxTests(AdminSeleniumWebDriverTestCase):
self
.
selenium
.
get
(
'
%
s
%
s'
%
(
self
.
live_server_url
,
'/test_admin/admin/admin_views/picture/add/'
))
self
.
assertEqual
(
self
.
selenium
.
switch_to
_active_element
()
,
self
.
selenium
.
switch_to
.
active_element
,
self
.
selenium
.
find_element_by_id
(
'id_name'
)
)
...
...
@@ -3732,7 +3732,7 @@ class SeleniumAdminViewsFirefoxTests(AdminSeleniumWebDriverTestCase):
self
.
selenium
.
get
(
'
%
s
%
s'
%
(
self
.
live_server_url
,
'/test_admin/admin/admin_views/reservation/add/'
))
self
.
assertEqual
(
self
.
selenium
.
switch_to
_active_element
()
,
self
.
selenium
.
switch_to
.
active_element
,
self
.
selenium
.
find_element_by_id
(
'id_start_date_0'
)
)
...
...
tests/admin_widgets/tests.py
Dosyayı görüntüle @
9b151590
...
...
@@ -985,26 +985,26 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
# Open the popup window and click on a band
self
.
selenium
.
find_element_by_id
(
'lookup_id_main_band'
)
.
click
()
self
.
selenium
.
switch_to
_
window
(
'id_main_band'
)
self
.
selenium
.
switch_to
.
window
(
'id_main_band'
)
self
.
wait_page_loaded
()
link
=
self
.
selenium
.
find_element_by_link_text
(
'Bogey Blues'
)
self
.
assertTrue
(
'/band/42/'
in
link
.
get_attribute
(
'href'
))
link
.
click
()
# The field now contains the selected band's id
self
.
selenium
.
switch_to
_
window
(
main_window
)
self
.
selenium
.
switch_to
.
window
(
main_window
)
self
.
wait_for_value
(
'#id_main_band'
,
'42'
)
# Reopen the popup window and click on another band
self
.
selenium
.
find_element_by_id
(
'lookup_id_main_band'
)
.
click
()
self
.
selenium
.
switch_to
_
window
(
'id_main_band'
)
self
.
selenium
.
switch_to
.
window
(
'id_main_band'
)
self
.
wait_page_loaded
()
link
=
self
.
selenium
.
find_element_by_link_text
(
'Green Potatoes'
)
self
.
assertTrue
(
'/band/98/'
in
link
.
get_attribute
(
'href'
))
link
.
click
()
# The field now contains the other selected band's id
self
.
selenium
.
switch_to
_
window
(
main_window
)
self
.
selenium
.
switch_to
.
window
(
main_window
)
self
.
wait_for_value
(
'#id_main_band'
,
'98'
)
def
test_many_to_many
(
self
):
...
...
@@ -1020,26 +1020,26 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
# Open the popup window and click on a band
self
.
selenium
.
find_element_by_id
(
'lookup_id_supporting_bands'
)
.
click
()
self
.
selenium
.
switch_to
_
window
(
'id_supporting_bands'
)
self
.
selenium
.
switch_to
.
window
(
'id_supporting_bands'
)
self
.
wait_page_loaded
()
link
=
self
.
selenium
.
find_element_by_link_text
(
'Bogey Blues'
)
self
.
assertTrue
(
'/band/42/'
in
link
.
get_attribute
(
'href'
))
link
.
click
()
# The field now contains the selected band's id
self
.
selenium
.
switch_to
_
window
(
main_window
)
self
.
selenium
.
switch_to
.
window
(
main_window
)
self
.
wait_for_value
(
'#id_supporting_bands'
,
'42'
)
# Reopen the popup window and click on another band
self
.
selenium
.
find_element_by_id
(
'lookup_id_supporting_bands'
)
.
click
()
self
.
selenium
.
switch_to
_
window
(
'id_supporting_bands'
)
self
.
selenium
.
switch_to
.
window
(
'id_supporting_bands'
)
self
.
wait_page_loaded
()
link
=
self
.
selenium
.
find_element_by_link_text
(
'Green Potatoes'
)
self
.
assertTrue
(
'/band/98/'
in
link
.
get_attribute
(
'href'
))
link
.
click
()
# The field now contains the two selected bands' ids
self
.
selenium
.
switch_to
_
window
(
main_window
)
self
.
selenium
.
switch_to
.
window
(
main_window
)
self
.
wait_for_value
(
'#id_supporting_bands'
,
'42,98'
)
...
...
@@ -1067,7 +1067,7 @@ class RelatedFieldWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
main_window
=
self
.
selenium
.
current_window_handle
# Click the Add User button to add new
self
.
selenium
.
find_element_by_id
(
'add_id_user'
)
.
click
()
self
.
selenium
.
switch_to
_
window
(
'id_user'
)
self
.
selenium
.
switch_to
.
window
(
'id_user'
)
self
.
wait_page_loaded
()
password_field
=
self
.
selenium
.
find_element_by_id
(
'id_password'
)
password_field
.
send_keys
(
'password'
)
...
...
@@ -1078,7 +1078,7 @@ class RelatedFieldWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
save_button_css_selector
=
'.submit-row > input[type=submit]'
self
.
selenium
.
find_element_by_css_selector
(
save_button_css_selector
)
.
click
()
self
.
selenium
.
switch_to
_
window
(
main_window
)
self
.
selenium
.
switch_to
.
window
(
main_window
)
# The field now contains the new user
self
.
wait_for
(
'#id_user option[value="newuser"]'
)
...
...
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