diff --git a/ojusomap/tests.py b/ojusomap/tests.py index f35ced5..e28f016 100644 --- a/ojusomap/tests.py +++ b/ojusomap/tests.py @@ -95,9 +95,11 @@ class MapTest(SeleniumTest): def place_marker(self): # click the zoom out button enough to bring up the thing to draw marker then use it. # the headless browser needs time between each click or it does not show the draw-marker control. - for i in range(0, 15): - self.sl.find_element_by_class_name("leaflet-control-zoom-in").click() + zoom_in = self.sl.find_element_by_class_name("leaflet-control-zoom-in") + for i in range(0, 30): + zoom_in.click() time.sleep(0.2) + self.sl.find_element_by_class_name("leaflet-draw-draw-marker").click() self.sl.find_element_by_id("id_location-map").click() @@ -202,6 +204,11 @@ class MapTest(SeleniumTest): ) self.sl.find_element_by_css_selector(".leaflet-marker-icon").click() + WebDriverWait(self.sl, 5).until( + visibility_of_element_located( + (By.CSS_SELECTOR, ".leaflet-popup-content a.btn") + ) + ) details_link = self.sl.find_element_by_css_selector( ".leaflet-popup-content a.btn" )