예제 #1
0
def test_communities_mobile_navigation(base_url, selenium_mobile):
    page = CommunitiesPage(selenium_mobile, base_url, slug='').open()
    assert not page.is_desktop_nav_displayed
    assert page.is_mobile_nav_displayed
    expected_url = '/contact/communities/north-america/'
    page.select_mobile_nav_item('North America', expected_url)
    assert expected_url in selenium_mobile.current_url, 'Page did not navigate to expected URL'
예제 #2
0
def test_communities_mobile_navigation(base_url, selenium):
    page = CommunitiesPage(selenium, base_url, slug='').open()
    assert not page.is_desktop_nav_displayed
    assert page.is_mobile_nav_displayed
    expected_url = '/contact/communities/north-america/'
    page.select_mobile_nav_item('North America', expected_url)
    assert expected_url in selenium.current_url, 'Page did not navigate to expected URL'
예제 #3
0
def test_communities_region_menus(slug, base_url, selenium):
    page = CommunitiesPage(selenium, base_url, slug=slug).open()
    region_menu = [s for s in page.regions if s.id == slug]
    assert len(region_menu) == 1
    assert region_menu[0].is_selected
    for community in region_menu[0].communities:
        assert community.is_displayed
예제 #4
0
def test_communities_region_legend(base_url, selenium):
    page = CommunitiesPage(selenium, base_url).open()
    for key in page.keys:
        key.click()
        assert key.is_selected
        region = next(r for r in page.regions if r.id == key.id)
        assert region.is_selected
        assert region.is_displayed
예제 #5
0
def test_communities_region_list(base_url, selenium):
    page = CommunitiesPage(selenium, base_url).open()
    for region in page.regions:
        region.click()
        assert region.is_selected
        assert region.is_displayed
        key = next(k for k in page.keys if k.id == region.id)
        assert key.is_selected
예제 #6
0
def test_communities_region_menus(base_url, selenium):
    page = CommunitiesPage(selenium, base_url).open()
    north_america = page.regions[0]
    assert not north_america.is_menu_open
    north_america.click()
    assert north_america.is_menu_open
    canada = north_america.communities[0]
    assert not canada.is_selected
    assert not canada.is_displayed
    canada.click()
    assert canada.is_selected
    assert canada.is_displayed
    page.regions[1].click()
    assert not north_america.is_menu_open
    assert not canada.is_selected
    assert not canada.is_displayed
예제 #7
0
def test_tab_navigation(base_url, selenium):
    contact_page = ContactPage(selenium, base_url).open()
    assert contact_page.contact_tab.is_selected
    assert not contact_page.spaces_tab.is_selected
    assert not contact_page.communities_tab.is_selected

    spaces_page = SpacesPage(selenium, base_url, slug='').open()
    assert not spaces_page.contact_tab.is_selected
    assert spaces_page.spaces_tab.is_selected
    assert not spaces_page.communities_tab.is_selected
    assert spaces_page.seed_url in selenium.current_url

    communities_page = CommunitiesPage(selenium, base_url, slug='').open()
    assert not communities_page.contact_tab.is_selected
    assert not communities_page.spaces_tab.is_selected
    assert communities_page.communities_tab.is_selected
    assert communities_page.seed_url in selenium.current_url
예제 #8
0
def test_communities_mobile_navigation(base_url, selenium_mobile):
    page = CommunitiesPage(selenium_mobile, base_url, slug='').open()
    assert page.is_mobile_menu_toggle_displayed
    page.open_communities_mobile_menu()
    assert page.is_nav_displayed