Example #1
0
def test_map_sources():
    """The map should have multiple sources"""
    MapView.set_map_source(MAP_SOURCES['osm-cyclemap'])
    assert Gst.get_string('map-source-id') == 'osm-cyclemap'

    Gst.set_string('map-source-id', 'mff-relief')
    assert MapView.get_map_source().get_id() == 'mff-relief'

    menu = Widgets.map_source_menu.get_active().get_group()
    assert menu
    for menu_item in menu:
        menu_item.set_active(True)
        assert MapView.get_map_source().get_name() == menu_item.get_label()