Пример #1
0
def test_mobile_poi_changed_name(browser, mobile):

    SEARCH: str = 'Gherkin'

    search_screen = MainScreen(mobile)
    search_screen.search_click()
    search = SearchScreen(mobile)
    search.search(SEARCH)

    poidetail = PoidetailScreen(mobile)
    poidetail.scroll_right()
    poidetail.scroll_left()
    #poidetail.trip()
    poidetail.save()

    save_page = SaveScreen(mobile)
    save_page.rename("New name")
    save_page.save()

    poidetail = PoidetailScreen(mobile)
    poidetail.close()

    main_screen = MainScreen(mobile)
    main_screen.menu_click()
    menu = MenuScreen(mobile)
    menu.places_and_routes()

    elem = functions.check_web_item(browser)
    assert elem.text == 'New name'

    # #delete poi
    functions.delete_poi(mobile)
Пример #2
0
def test_mobile_muni_poi(browser, mobile):

    SEARCH: str = 'Wurzen'
    search_screen = MainScreen(mobile)
    search_screen.search_click()
    search = SearchScreen(mobile)
    search.search(SEARCH)

    poidetail = PoidetailScreen(mobile)
    poidetail.save()

    save_page = SaveScreen(mobile)
    save_page.save()

    poidetail = PoidetailScreen(mobile)
    poidetail.close()

    main_screen = MainScreen(mobile)
    main_screen.menu_click()
    menu = MenuScreen(mobile)
    menu.places_and_routes()

    elem = functions.check_web_item(browser)
    assert elem.text == SEARCH

    # #delete poi
    functions.delete_poi(mobile)
Пример #3
0
def test_mobile_reorder(browser, mobile):

    countries = ['Poland', 'Sweden']
    for SEARCH in countries:
        search_screen = MainScreen(mobile)
        search_screen.search_click()
        search = SearchScreen(mobile)
        search.search(SEARCH)

        poidetail = PoidetailScreen(mobile)
        poidetail.save()

        save_page = SaveScreen(mobile)
        save_page.save()

        poidetail = PoidetailScreen(mobile)
        poidetail.close()

    main_screen = MainScreen(mobile)
    main_screen.menu_click()
    menu = MenuScreen(mobile)
    menu.places_and_routes()

    my_maps = MyMapsScreen(mobile)
    order = my_maps.order_2_items()

    elems = functions.return_web_items(browser)
    web_order = []
    for i in elems:
        web_order.append(i.text)

    print(order)
    print(web_order)

    assert order == web_order

    my_maps.reoder_2_items()