Example #1
0
def test_devhub_resources_participate(selenium, base_url, variables):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    page.devhub_login('developer')
    assert 'More Ways to Participate' in page.resources.participate_section_header
    assert (variables['devhub_resources_participate_text']
            in page.resources.participate_section_info_text)
    page.resources.click_participate_section_link()
    page.wait_for_current_url('/Add-ons/Contribute')
Example #2
0
def test_devhub_resources_write_some_code(selenium, base_url, variables):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    page.devhub_login('developer')
    assert 'Write Some Code' in page.resources.write_code_section_header
    assert (variables['devhub_resources_write_some_code_text']
            in page.resources.write_code_section_info_text)
    page.resources.click_write_code_section_link()
    page.wait_for_current_url('/Add-ons/Contribute/Code')
Example #3
0
def test_devhub_resources_join_addon_review(selenium, base_url, variables):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    page.devhub_login('developer')
    assert 'Review Add-ons' in page.resources.review_addons_section_header
    assert (variables['devhub_resources_review_addons_text']
            in page.resources.review_addons_section_info_text)
    page.resources.click_join_addon_review_link()
    page.wait_for_current_url('/Add-ons/Reviewers')
Example #4
0
def test_connect_newsletter_section(selenium, base_url, variables):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    # verifies the elements of the Newsletter signup section
    assert (variables['devhub_newsletter_header']
            in page.connect.newsletter_section_header)
    assert variables[
        'devhub_newsletter_info_text'] in page.connect.newsletter_info_text
    # verify that the Privacy notice links opens the right page
    page.connect.click_newsletter_privacy_notice_link()
    page.wait_for_current_url('/privacy/websites/')
Example #5
0
def test_devhub_resources_footer_promote_links(selenium, base_url, variables):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    page.devhub_login('developer')
    assert 'Promote' in page.resources.promote_section_header
    count = 0
    # looping through the actual number of Promote links present in the resources footer
    while count in range(len(page.resources.promote_section_links)):
        link = page.resources.promote_section_links[count]
        link.click()
        # checks that the expected page is opened when clicking on the link
        page.wait_for_current_url(
            variables['devhub_resources_promote_links'][count])
        # go back to devhub and select the next Promote link
        selenium.back()
        count += 1
Example #6
0
def test_devhub_content_login_link(selenium, base_url, variables):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    page.click_content_login_link()
    # verify that the link opens the FxA login page
    page.wait_for_current_url('accounts.firefox.com')
Example #7
0
def test_devhub_legal_footer_links(base_url, selenium, count, link):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    page.footer.legal_links[count].click()
    page.wait_for_current_url(link)
Example #8
0
def test_click_support(selenium, base_url):
    page = DevHubHome(selenium, base_url).open().wait_for_page_to_load()
    # clicks on Support header menu and checks page is loaded
    page.click_support()
    page.wait_for_current_url('Add-ons#Get_in_touch')