Ejemplo n.º 1
0
def test_change_language(base_url, selenium):
    page = DownloadPage(selenium, base_url, params='').open()
    initial = page.footer.language
    # avoid selecting the same language or locales that have homepage redirects
    excluded = [initial, 'ja', 'ja-JP-mac', 'zh-CN']
    available = [l for l in page.footer.languages if l not in excluded]
    new = random.choice(available)
    page.footer.select_language(new)
    assert '/{0}/'.format(new) in selenium.current_url, 'Language is not in URL'
    assert new == page.footer.language, 'Language has not been selected'
Ejemplo n.º 2
0
def test_click_download_button(base_url, selenium):
    page = DownloadPage(selenium, base_url).open()
    thank_you_page = page.download_firefox()
    assert thank_you_page.seed_url in selenium.current_url
Ejemplo n.º 3
0
def test_download_button_displayed(base_url, selenium):
    page = DownloadPage(selenium, base_url).open()
    assert page.download_button.is_displayed
Ejemplo n.º 4
0
def test_click_download_button(base_url, selenium):
    page = DownloadPage(base_url, selenium).open()
    thank_you_page = page.download_firefox()
    assert thank_you_page.url in selenium.current_url
Ejemplo n.º 5
0
def test_other_platforms_modal(base_url, selenium):
    page = DownloadPage(selenium, base_url).open()
    modal = page.open_other_platforms_modal()
    assert modal.is_displayed
    modal.close()
Ejemplo n.º 6
0
def test_other_platforms_modal(base_url, selenium):
    page = DownloadPage(selenium, base_url, locale='ru',
                        params='?geo=us').open()
    modal = page.open_other_platforms_modal()
    assert modal.is_displayed
    modal.close()
Ejemplo n.º 7
0
def test_yandex_download_button_displayed(base_url, selenium):
    page = DownloadPage(selenium, base_url, locale='ru',
                        params='?geo=ru').open()
    assert not page.download_button.is_displayed
    assert page.is_yandex_download_button_displayed
Ejemplo n.º 8
0
def test_download_button_displayed(base_url, selenium):
    page = DownloadPage(selenium, base_url, locale='ru',
                        params='?geo=us').open()
    assert page.download_button.is_displayed
    assert page.download_button.is_transitional_link
Ejemplo n.º 9
0
def test_other_platforms_modal(base_url, selenium):
    page = DownloadPage(selenium, base_url, params='').open()
    modal = page.open_other_platforms_modal()
    assert modal.is_displayed
    modal.close()
Ejemplo n.º 10
0
def test_firefox_account_modal(base_url, selenium):
    page = DownloadPage(selenium, base_url, params='').open()
    modal = page.open_join_firefox_modal()
    assert modal.is_displayed
    modal.close()
Ejemplo n.º 11
0
def test_other_platforms_modal(base_url, selenium):
    page = DownloadPage(selenium, base_url, locale='ru', params='?geo=us').open()
    modal = page.open_legacy_other_platforms_modal()
    assert modal.is_displayed
    modal.close()
Ejemplo n.º 12
0
def test_firefox_account_modal(base_url, selenium):
    page = DownloadPage(selenium, base_url, locale='de', params='').open()
    modal = page.open_firefox_account_modal()
    assert modal.is_displayed
    modal.close()