summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 9d835aa93..085897dea 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -4394,30 +4394,12 @@ class SeleniumTestsOperations(SeleniumTests):
def test_geo_items(self):
pks, geojsons = self.pks_and_geojson()
- 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"]'
- )
- dropdown.click()
- self.selenium.find_element_by_xpath(
- '//div[@class="dropdown-menu show"]/a[@href="/operation_search/"]'
- ).click()
+ self.access_from_dropdown('operation')
ope = models.Operation.objects.get(pk=pks["Poly"])
slug_pk_poly = ope.SLUG + "-" + str(ope.pk)
self._test_operation(2, slug_pk_poly, copy.deepcopy(geojsons), "Poly")
- 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')
ope = models.Operation.objects.get(pk=pks["Pt"])
slug_pk_pt = ope.SLUG + "-" + str(ope.pk)
self._test_operation(1, slug_pk_pt, copy.deepcopy(geojsons), "Pt")