예제 #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'
예제 #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
예제 #3
0
def test_download_button_displayed(base_url, selenium):
    page = DownloadPage(selenium, base_url).open()
    assert page.download_button.is_displayed
예제 #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
예제 #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()
예제 #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()
예제 #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
예제 #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
예제 #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()
예제 #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()
예제 #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()
예제 #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()