summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/tests.py42
1 files changed, 3 insertions, 39 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 17e327bd0..afc8a0f7e 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -2884,19 +2884,7 @@ class SeleniumTestsBaseFinds(SeleniumTests):
pks, geojsons = self.pks_and_geojson()
# from operation
for i in range(1, 3):
- self.WebDriverWait(self.selenium, self.waiting_time).until(
- lambda driver: driver.find_element_by_xpath(
- '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]'
- )
- )
- dropdown = self.selenium.find_element_by_xpath(
- '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]'
- )
- self.scroll(dropdown)
- dropdown.click()
- self.selenium.find_element_by_xpath(
- '//div[@class="dropdown-menu show"]/a[@href="/operation_search/"]'
- ).click()
+ self.access_from_dropdown('operation')
details = self.selenium.find_element_by_xpath(
"//tbody/tr[" + str(i) + ']/td/a[@class="display_details"]'
)
@@ -2909,19 +2897,7 @@ class SeleniumTestsBaseFinds(SeleniumTests):
self._test_bf(j, pks, copy.deepcopy(geojsons))
# from context record
for i in range(1, 5):
- self.WebDriverWait(self.selenium, self.waiting_time).until(
- lambda driver: driver.find_element_by_xpath(
- '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]'
- )
- )
- dropdown = self.selenium.find_element_by_xpath(
- '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]'
- )
- self.scroll(dropdown)
- dropdown.click()
- self.selenium.find_element_by_xpath(
- '//div[@class="dropdown-menu show"]/a[@href="/record_search/"]'
- ).click()
+ self.access_from_dropdown('record')
details = self.selenium.find_element_by_xpath(
"//tbody/tr[" + str(i) + ']/td/a[@class="display_details"]'
)
@@ -2934,19 +2910,7 @@ class SeleniumTestsBaseFinds(SeleniumTests):
self._test_bf(j, pks, copy.deepcopy(geojsons))
# from search
for i in range(1, 9):
- self.WebDriverWait(self.selenium, self.waiting_time).until(
- lambda driver: driver.find_element_by_xpath(
- '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]'
- )
- )
- dropdown = self.selenium.find_element_by_xpath(
- '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]'
- )
- self.scroll(dropdown)
- dropdown.click()
- self.selenium.find_element_by_xpath(
- '//div[@class="dropdown-menu show"]/a[@href="/find_search/"]'
- ).click()
+ self.access_from_dropdown('find')
self._test_bf(i, pks, copy.deepcopy(geojsons), from_search=True)
# from bottom table
for i in range(1, 8):