diff options
author | QuentinAndre <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 | 6be165ad3a5f7d4a1b7622c095a4996857ecb114 (patch) | |
tree | 28e14ae9fae4437a633aba1103feb2f8e8d469a6 /archaeological_context_records/tests.py | |
parent | 82893c90a90eec6718de7bed10962f68712a41a6 (diff) | |
download | Ishtar-6be165ad3a5f7d4a1b7622c095a4996857ecb114.tar.bz2 Ishtar-6be165ad3a5f7d4a1b7622c095a4996857ecb114.zip |
factorization of access_from_dropdown for tests
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r-- | archaeological_context_records/tests.py | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index a089c1dc5..a99fbefe6 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -1500,19 +1500,7 @@ class SeleniumTestsContextRecords(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"]' ) @@ -1525,19 +1513,7 @@ class SeleniumTestsContextRecords(SeleniumTests): self._test_cr(j, pks, copy.deepcopy(geojsons), method="from operation") # from search bar 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') self._test_cr(i, pks, copy.deepcopy(geojsons)) # from bottom table, multiple displays for i in range(1, 4): |