def test_deeplink_guides_page(self, main, steps, system_steps): steps.wait_map_auto_download(LocalizedMapsNames.MOSCOW.get()) params = (("url", "search/?tag=24&city=4611686018695784240"), ) res = self.create_url("https://dlink.maps.me/guides_page", params) system_steps.execute_deeplink_universal(res) sleep(10) guides_page = GuidesCatalog() assert guides_page.navigation_bar_title() assert guides_page.filter_by_city().get_attribute( attributes.TEXT_VALUE.get()) == LocalizedMapsNames.AMSTERDAM.get() assert guides_page.filter_by_tag().get_attribute( attributes.TEXT_VALUE.get()) == LocalizedCategories.FOOD.get() guides_page.close()
def test_discovery_guides(self, main, download_moscow_map, steps): panel = BottomPanel() panel.discovery().click() page = DiscoveryPage() sleep(5) guide_name = page.first_guide_name().text guide_type = page.first_guide_type().text page.first_guide_name().click() guides_page = GuidesCatalog() assert guides_page.navigation_bar_title() if len([ x for x in steps.driver.contexts if x != "NATIVE_APP" and "chrome" not in x ]) > 0: assert guides_page.guide_title().text == guide_name assert guides_page.guide_author().text == guide_type else: sleep(3) assert steps.try_get_by_text(guide_name) sleep(3) assert steps.try_get_by_text(guide_type, strict=False) guides_page.close().click() steps.press_back_until_main_page() panel.discovery().click() sleep(5) coord_y = page.first_guide_name().location["y"] page.slide_left(coord_y, 3) page.click_more(coord_y) assert guides_page.navigation_bar_title() if len([ x for x in steps.driver.contexts if x != "NATIVE_APP" and "chrome" not in x ]) > 0: assert guides_page.breadcrumbs_active_item( ).text == LocalizedMapsNames.MOSCOW.get() assert guides_page.see_all() guides_page.close().click()
def test_deeplink_onelink_guides_page(self, main, steps, system_steps): steps.wait_map_auto_download(LocalizedMapsNames.MOSCOW.get()) params = ( ("pid", "mapsme_app"), ("is_retargeting", "true"), ("af_dp", "https://dlink.maps.me/guides_page?url=search%2F%3Fcity%3D4611686018695784240%26tag%3D24" ), ) res = self.create_url("https://mapsme.onelink.me/LBgk", params) system_steps.execute_onelink_deeplink(res) sleep(10) guides_page = GuidesCatalog() assert guides_page.navigation_bar_title() assert guides_page.filter_by_city().get_attribute( attributes.TEXT_VALUE.get()) == LocalizedMapsNames.AMSTERDAM.get() assert guides_page.filter_by_tag().get_attribute( attributes.TEXT_VALUE.get()) == LocalizedCategories.FOOD.get() guides_page.close()