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