Esempio n. 1
0
    def test_walk_routing_bookmark(self, main, download_moscow_map, steps,
                                   r_steps, bookmark_steps):
        panel = BottomPanel()
        bookmark_steps.delete_all_groups()
        bookmark_steps.delete_bookmark(LocalizedButtons.MY_BOOKMARKS.get(),
                                       "проспект Мира, 78")
        bookmark_name = "проспект Мира, 78"
        bookmark_steps.create_bookmark(bookmark_name)
        steps.search("метро Алексеевская")

        steps.choose_first_search_result()
        panel.to().click()
        el = steps.try_get_by_text(LocalizedButtons.ACCEPT.get())
        if el:
            el.click()
        steps.try_get(Locator.ROUTING_WALK.get()).click()
        r_steps.wait_route_start()
        steps.press_back_until_main_page()
        panel.bookmarks().click()
        bookmark_steps.click_bookmark_group(
            LocalizedButtons.MY_BOOKMARKS.get())
        bookmark = bookmark_steps.try_find_bookmark_with_scroll(bookmark_name)
        sleep(1)
        bookmark.click()
        panel.to().click()
        el = steps.try_get_by_text(LocalizedButtons.ACCEPT.get())
        if el:
            el.click()

        r_steps.wait_route_start()
        assert not steps.try_get(Locator.ROUTING_WALK.get())
Esempio n. 2
0
    def test_auto_routing_bookmark(self, main, download_moscow_map, steps,
                                   r_steps, bookmark_steps):
        panel = BottomPanel()
        bookmark_steps.delete_all_groups()
        bookmark_steps.delete_bookmark(LocalizedButtons.MY_BOOKMARKS.get(),
                                       "проспект Мира, 78")
        bookmark_name = "проспект Мира, 78"
        bookmark_steps.create_bookmark(bookmark_name)
        panel.bookmarks().click()
        bookmark_steps.click_bookmark_group(
            LocalizedButtons.MY_BOOKMARKS.get())
        bookmark = bookmark_steps.try_find_bookmark_with_scroll(bookmark_name)
        sleep(1)
        bookmark.click()
        panel.to().click()
        el = steps.try_get_by_text(LocalizedButtons.ACCEPT.get())
        if el:
            el.click()

        r_steps.wait_route_start()