summaryrefslogtreecommitdiff
path: root/tests/admin_views/tests.py
diff options
context:
space:
mode:
authorTom Carrick <tom@carrick.eu>2023-11-23 18:26:01 +0100
committerNatalia <124304+nessita@users.noreply.github.com>2023-11-27 15:20:59 -0300
commitbd0ea8c2ba9943ed245771265f55645dc3bfeae8 (patch)
tree7853fee403857802f21ddb0f5a6f9d54886b7775 /tests/admin_views/tests.py
parentcdb14cc18bbfc7c32a6139137fe0151875e1c92e (diff)
[4.2.x] Fixed #34982 -- Fixed admin's read-only password widget and help texts alignment for tablet screen size.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Backport of 729266c6f29c7a0677b24926a86a767ef3078b26 from main
Diffstat (limited to 'tests/admin_views/tests.py')
-rw-r--r--tests/admin_views/tests.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 9c20ce2e2e..f40415681a 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -5576,6 +5576,7 @@ class SeleniumTests(AdminSeleniumTestCase):
and with stacked and tabular inlines.
Refs #13068, #9264, #9983, #9784.
"""
+ from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
self.admin_login(
@@ -5588,6 +5589,8 @@ class SeleniumTests(AdminSeleniumTestCase):
# Main form ----------------------------------------------------------
self.selenium.find_element(By.ID, "id_pubdate").send_keys("2012-02-18")
+ status = self.selenium.find_element(By.ID, "id_status")
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.select_option("#id_status", "option two")
self.selenium.find_element(By.ID, "id_name").send_keys(
" the mAin nÀMë and it's awεšomeıııİ"
@@ -5606,6 +5609,10 @@ class SeleniumTests(AdminSeleniumTestCase):
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-0-pubdate"
).send_keys("2011-12-17")
+ status = self.selenium.find_element(
+ By.ID, "id_relatedprepopulated_set-0-status"
+ )
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.select_option("#id_relatedprepopulated_set-0-status", "option one")
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-0-name"
@@ -5637,6 +5644,10 @@ class SeleniumTests(AdminSeleniumTestCase):
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-1-pubdate"
).send_keys("1999-01-25")
+ status = self.selenium.find_element(
+ By.ID, "id_relatedprepopulated_set-1-status"
+ )
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.select_option("#id_relatedprepopulated_set-1-status", "option two")
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-1-name"
@@ -5660,10 +5671,10 @@ class SeleniumTests(AdminSeleniumTestCase):
# Tabular inlines ----------------------------------------------------
# Initial inline
- element = self.selenium.find_element(
+ status = self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-2-0-status"
)
- self.selenium.execute_script("window.scrollTo(0, %s);" % element.location["y"])
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-2-0-pubdate"
).send_keys("1234-12-07")
@@ -5694,6 +5705,10 @@ class SeleniumTests(AdminSeleniumTestCase):
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-2-1-pubdate"
).send_keys("1981-08-22")
+ status = self.selenium.find_element(
+ By.ID, "id_relatedprepopulated_set-2-1-status"
+ )
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.select_option("#id_relatedprepopulated_set-2-1-status", "option one")
self.selenium.find_element(
By.ID, "id_relatedprepopulated_set-2-1-name"
@@ -5720,6 +5735,8 @@ class SeleniumTests(AdminSeleniumTestCase):
# Initial inline.
row_id = "id_relatedprepopulated_set-4-0-"
self.selenium.find_element(By.ID, f"{row_id}pubdate").send_keys("2011-12-12")
+ status = self.selenium.find_element(By.ID, f"{row_id}status")
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.select_option(f"#{row_id}status", "option one")
self.selenium.find_element(By.ID, f"{row_id}name").send_keys(
" sŤāÇkeð inline ! "
@@ -5739,6 +5756,8 @@ class SeleniumTests(AdminSeleniumTestCase):
)[3].click()
row_id = "id_relatedprepopulated_set-4-1-"
self.selenium.find_element(By.ID, f"{row_id}pubdate").send_keys("1999-01-20")
+ status = self.selenium.find_element(By.ID, f"{row_id}status")
+ ActionChains(self.selenium).move_to_element(status).click(status).perform()
self.select_option(f"#{row_id}status", "option two")
self.selenium.find_element(By.ID, f"{row_id}name").send_keys(
" now you haVe anöther sŤāÇkeð inline with a very loooong "