def test_devhub_click_submit_new_theme_button(selenium, base_url, wait): page = DevHubHome(selenium, base_url).open().wait_for_page_to_load() page.devhub_login('developer') distribution_page = page.click_submit_theme_button() wait.until( lambda _: distribution_page.submission_form_header.is_displayed(), message='The addon distribution page header as not displayed', )
def test_devhub_click_first_theme_button(selenium, base_url, variables): page = DevHubHome(selenium, base_url).open().wait_for_page_to_load() # an account with no add-ons submitted is used page.devhub_login('regular_user') page.wait_for_page_to_load() distribution_page = page.click_submit_theme_button() # if this user never accepted the distribution agreement, it should be displayed in the page, otherwise not try: assert (variables['devhub_submit_addon_agreement_header'] in distribution_page.distribution_header.text) except AssertionError: assert (variables['devhub_submit_addon_distribution_header'] in distribution_page.distribution_header.text)