Refs #24179 -- Fixed selenium tests for offset of admin selector boxes in fieldset.
Regression in be63c78760
.
This commit is contained in:
parent
42cd8c390d
commit
a2e580acf6
|
@ -5875,13 +5875,17 @@ class SeleniumTests(AdminSeleniumTestCase):
|
||||||
url = self.live_server_url + reverse("admin7:admin_views_pizza_add")
|
url = self.live_server_url + reverse("admin7:admin_views_pizza_add")
|
||||||
self.selenium.get(url)
|
self.selenium.get(url)
|
||||||
self.selenium.find_elements(By.LINK_TEXT, "Show")[0].click()
|
self.selenium.find_elements(By.LINK_TEXT, "Show")[0].click()
|
||||||
filter_box = self.selenium.find_element(By.ID, "id_toppings_filter")
|
from_filter_box = self.selenium.find_element(By.ID, "id_toppings_filter")
|
||||||
from_box = self.selenium.find_element(By.ID, "id_toppings_from")
|
from_box = self.selenium.find_element(By.ID, "id_toppings_from")
|
||||||
|
to_filter_box = self.selenium.find_element(By.ID, "id_toppings_filter_selected")
|
||||||
to_box = self.selenium.find_element(By.ID, "id_toppings_to")
|
to_box = self.selenium.find_element(By.ID, "id_toppings_to")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
to_box.get_property("offsetHeight"),
|
|
||||||
(
|
(
|
||||||
filter_box.get_property("offsetHeight")
|
to_filter_box.get_property("offsetHeight")
|
||||||
|
+ to_box.get_property("offsetHeight")
|
||||||
|
),
|
||||||
|
(
|
||||||
|
from_filter_box.get_property("offsetHeight")
|
||||||
+ from_box.get_property("offsetHeight")
|
+ from_box.get_property("offsetHeight")
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -5896,13 +5900,21 @@ class SeleniumTests(AdminSeleniumTestCase):
|
||||||
)
|
)
|
||||||
url = self.live_server_url + reverse("admin7:admin_views_question_add")
|
url = self.live_server_url + reverse("admin7:admin_views_question_add")
|
||||||
self.selenium.get(url)
|
self.selenium.get(url)
|
||||||
filter_box = self.selenium.find_element(By.ID, "id_related_questions_filter")
|
from_filter_box = self.selenium.find_element(
|
||||||
|
By.ID, "id_related_questions_filter"
|
||||||
|
)
|
||||||
from_box = self.selenium.find_element(By.ID, "id_related_questions_from")
|
from_box = self.selenium.find_element(By.ID, "id_related_questions_from")
|
||||||
|
to_filter_box = self.selenium.find_element(
|
||||||
|
By.ID, "id_related_questions_filter_selected"
|
||||||
|
)
|
||||||
to_box = self.selenium.find_element(By.ID, "id_related_questions_to")
|
to_box = self.selenium.find_element(By.ID, "id_related_questions_to")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
to_box.get_property("offsetHeight"),
|
|
||||||
(
|
(
|
||||||
filter_box.get_property("offsetHeight")
|
to_filter_box.get_property("offsetHeight")
|
||||||
|
+ to_box.get_property("offsetHeight")
|
||||||
|
),
|
||||||
|
(
|
||||||
|
from_filter_box.get_property("offsetHeight")
|
||||||
+ from_box.get_property("offsetHeight")
|
+ from_box.get_property("offsetHeight")
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue