def go_to_custom_level(self, level): path = reverse('play_custom_level', kwargs={'levelId': str(level.id)}) self._go_to_path(path) selenium.execute_script( 'ocargo.animation.FAST_ANIMATION_DURATION = 1;') return GamePage(selenium)
def go_to_episode(self, episodeId): path = reverse('start_episode', kwargs={'episodeId': str(episodeId)}) self._go_to_path(path) selenium.execute_script( 'ocargo.animation.FAST_ANIMATION_DURATION = 1;') return GamePage(selenium)
def go_to_level(self, level_name): path = reverse('play_default_level', kwargs={'levelName': str(level_name)}) self._go_to_path(path) selenium.execute_script( 'ocargo.animation.FAST_ANIMATION_DURATION = 1;') return GamePage(selenium)
def test_list_stations_visible_on_map(self): # Visit site and wait until three stations are shown selenium.get(self.live_server_url) self.td_komboti.wait_until_is_displayed() self.td_agios_athanasios.wait_until_is_displayed() self.td_tharbad.wait_until_is_displayed() # Zoom station to an area that covers only two of these stations. # The co-ordinates below are 21, 39, 22, 40 in srid=3857. selenium.execute_script(""" enhydris.map.zoomToExtent([2337700, 4721700, 2449000, 4865900]); """) # Click on "List stations visible on map" self.button_limit_to_map.click() # Now only two stations should be displayed self.td_komboti.wait_until_is_displayed() self.td_agios_athanasios.wait_until_is_displayed() self.assertFalse(self.td_tharbad.exists())
def go_to_custom_level(self, level): path = reverse("play_custom_level", kwargs={"levelId": str(level.id)}) self._go_to_path(path) selenium.execute_script("ocargo.animation.FAST_ANIMATION_DURATION = 1;") return GamePage(selenium)
def go_to_level(self, level_name): path = reverse("play_default_level", kwargs={"levelName": str(level_name)}) self._go_to_path(path) selenium.execute_script("ocargo.animation.FAST_ANIMATION_DURATION = 1;") return GamePage(selenium)
def go_to_episode(self, episodeId): path = reverse("start_episode", kwargs={"episodeId": str(episodeId)}) self._go_to_path(path) selenium.execute_script("ocargo.animation.FAST_ANIMATION_DURATION = 1;") return GamePage(selenium)