diff options
| author | Quentin André <quentin.andre@imt-atlantique.net> | 2021-08-25 16:19:11 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-07-08 09:58:48 +0200 | 
| commit | c1f12a9f4b6d724b6db3bed8e429118288933584 (patch) | |
| tree | 28e14ae9fae4437a633aba1103feb2f8e8d469a6 /archaeological_operations/tests.py | |
| parent | 3411f82f63aed68ca5037e5088608b25573eab3e (diff) | |
| download | Ishtar-c1f12a9f4b6d724b6db3bed8e429118288933584.tar.bz2 Ishtar-c1f12a9f4b6d724b6db3bed8e429118288933584.zip  | |
factorization of access_from_dropdown for tests
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 22 | 
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")  | 
