update submissions tests (#877)
This commit is contained in:
Родитель
79e63131f7
Коммит
4afc5b94fd
|
@ -61,6 +61,5 @@ class ManageAddons(Base):
|
|||
return self.find_element(*self._addon_name_locator).text
|
||||
|
||||
def click_addon_name(self):
|
||||
self.wait.until(EC.element_to_be_clickable(self._addon_edit_link_locator))
|
||||
self.find_element(*self._addon_edit_link_locator).click()
|
||||
return EditAddon(self.driver, self.page.base_url).wait_for_page_to_load()
|
||||
|
|
|
@ -82,7 +82,7 @@ class SubmitAddon(Page):
|
|||
)
|
||||
_create_theme_button_locator = (By.ID, "wizardlink")
|
||||
_submit_file_button_locator = (By.ID, "submit-upload-file-finish")
|
||||
_addon_validation_success_locator = (By.CLASS_NAME, "bar-success")
|
||||
_addon_validation_success_locator = (By.CSS_SELECTOR, "#upload-status-bar.bar-success")
|
||||
_validation_fail_bar_locator = (By.CLASS_NAME, "bar-fail")
|
||||
_validation_support_link_locator = (By.CSS_SELECTOR, "#upload-status-results a")
|
||||
_validation_failed_message_locator = (
|
||||
|
@ -611,14 +611,14 @@ class ListedAddonSubmissionForm(Page):
|
|||
_is_experimental_checkbox_locator = (By.ID, "id_is_experimental")
|
||||
_requires_payment_checkbox_locator = (By.ID, "id_requires_payment")
|
||||
_categories_section_locator = (By.ID, "addon-categories-edit")
|
||||
_firefox_categories_locator = (
|
||||
_categories_locator = (
|
||||
By.CSS_SELECTOR,
|
||||
".addon-app-cats:nth-of-type(1) > ul input",
|
||||
)
|
||||
_android_categories_locator = (
|
||||
By.CSS_SELECTOR,
|
||||
".addon-app-cats:nth-of-type(2) > ul input",
|
||||
)
|
||||
# _android_categories_locator = (
|
||||
# By.CSS_SELECTOR,
|
||||
# ".addon-app-cats:nth-of-type(2) > ul input",
|
||||
# )
|
||||
_email_input_field_locator = (By.ID, "id_support_email_0")
|
||||
_support_site_input_field_locator = (By.ID, "id_support_url_0")
|
||||
_license_options_locator = (By.CLASS_NAME, "license")
|
||||
|
@ -637,7 +637,8 @@ class ListedAddonSubmissionForm(Page):
|
|||
".submission-buttons button:nth-child(2)",
|
||||
)
|
||||
# _theme_categories_locator = (By.CSS_SELECTOR, '#addon-categories-edit > ul input') - temporary not available
|
||||
_theme_categories_locator = (By.CSS_SELECTOR, "#id_category input")
|
||||
_theme_categories_locator = (By.CSS_SELECTOR, ".addon-app-cats")
|
||||
_theme_category_abstract_locator = (By.CSS_SELECTOR, "#id_categories > div:nth-child(1) > label")
|
||||
_theme_licence_sharing_rights_locator = (
|
||||
By.CSS_SELECTOR,
|
||||
"#cc-chooser ul:nth-of-type(1) input",
|
||||
|
@ -666,6 +667,10 @@ class ListedAddonSubmissionForm(Page):
|
|||
def clear_addon_name(self):
|
||||
self.find_element(*self._addon_name_field_locator).clear()
|
||||
|
||||
@property
|
||||
def theme_category_abstract(self):
|
||||
return self.find_element(*self._theme_category_abstract_locator)
|
||||
|
||||
@property
|
||||
def addon_name_field(self):
|
||||
self.wait.until(
|
||||
|
@ -717,11 +722,11 @@ class ListedAddonSubmissionForm(Page):
|
|||
)
|
||||
return self.find_element(*self._categories_section_locator)
|
||||
|
||||
def select_firefox_categories(self, count):
|
||||
self.find_elements(*self._firefox_categories_locator)[count].click()
|
||||
def select_categories(self, count):
|
||||
self.find_elements(*self._categories_locator)[count].click()
|
||||
|
||||
def select_android_categories(self, count):
|
||||
self.find_elements(*self._android_categories_locator)[count].click()
|
||||
# def select_android_categories(self, count):
|
||||
# self.find_elements(*self._android_categories_locator)[count].click()
|
||||
|
||||
def select_theme_categories(self, count):
|
||||
self.find_elements(*self._theme_categories_locator)[count].click()
|
||||
|
@ -929,5 +934,4 @@ class SubmissionConfirmationPage(Page):
|
|||
|
||||
@property
|
||||
def generated_theme_preview(self):
|
||||
self.wait.until(EC.visibility_of_element_located(self._theme_preview_locator))
|
||||
return self.find_element(*self._theme_preview_locator)
|
||||
|
|
Двоичные данные
sample-addons/make-addon.zip
Двоичные данные
sample-addons/make-addon.zip
Двоичный файл не отображается.
|
@ -1 +1 @@
|
|||
{"manifest_version": 2, "version": "3.0", "name": "EN-US Name edited"}
|
||||
{"manifest_version": 2, "version": "1.0", "name": "\u028c\u0251:\u00e6\u010d\u03b2\u3041\u0147", "description": "\u263a\ufe0f\u028c\u0251:\u00e6\u010d\u03b2\u3041\u0147\u263a\ufe0f"}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1 +1 @@
|
|||
1oxn6s79cpl2jb4s575nr0mps0u0nna8
|
||||
ktforx1gytxlcbxneb64clczzp8x0a9t
|
|
@ -71,7 +71,7 @@ def firefox_options(firefox_options, base_url, variables):
|
|||
firefox_options.set_preference(
|
||||
"extensions.update.url", variables["extensions_update_url"]
|
||||
)
|
||||
firefox_options.add_argument("-headless")
|
||||
firefox_options.add_argument("-foreground")
|
||||
firefox_options.log.level = "trace"
|
||||
return firefox_options
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ def submit_addon_method(selenium, base_url):
|
|||
summary = reusables.get_random_string(10)
|
||||
confirmation_page.set_addon_name(random_string)
|
||||
confirmation_page.set_addon_summary(summary)
|
||||
confirmation_page.select_firefox_categories(1)
|
||||
confirmation_page.select_categories(1)
|
||||
confirmation_page.select_license_options[0].click()
|
||||
confirmation_page.submit_addon()
|
||||
return f"listed-addon{random_string}"
|
||||
|
@ -138,7 +138,7 @@ def test_disable_an_addon_at_submission_tc_id_c1898098(selenium, base_url, wait,
|
|||
listed_addon_submission_form.clear_addon_name()
|
||||
listed_addon_submission_form.set_addon_name(random_string)
|
||||
listed_addon_submission_form.set_addon_summary(summary)
|
||||
listed_addon_submission_form.select_firefox_categories(1)
|
||||
listed_addon_submission_form.select_categories(1)
|
||||
listed_addon_submission_form.select_license_options[0].click()
|
||||
"""Complete the form and "Submit Version"""
|
||||
listed_addon_submission_form.submit_addon()
|
||||
|
|
|
@ -91,7 +91,7 @@ def test_submit_listed_wizard_theme_tc_id_c97500(selenium, base_url, variables,
|
|||
assert theme_name in theme_details.addon_name_field.get_attribute("value")
|
||||
theme_details.set_addon_summary("Theme summary")
|
||||
# select a category for the theme
|
||||
theme_details.select_theme_categories(0)
|
||||
theme_details.theme_category_abstract.click()
|
||||
# set up a license for the theme based on 'Yes'[0]/'No'[1] options
|
||||
theme_details.select_theme_licence_sharing_rights(1)
|
||||
theme_details.select_theme_license_commercial_use(1)
|
||||
|
@ -251,8 +251,8 @@ def test_submit_listed_addon_tc_id_c4369(selenium, base_url, variables, wait):
|
|||
details_form.requires_payment.click()
|
||||
# reusables.scroll_into_view(selenium, details_form.categories_section)
|
||||
# set Firefox and Android categories for the addon
|
||||
details_form.select_firefox_categories(0)
|
||||
details_form.select_android_categories(0)
|
||||
details_form.select_categories(0)
|
||||
# details_form.select_android_categories(0)
|
||||
details_form.email_input_field("some-mail@mail.com")
|
||||
details_form.support_site_input_field("https://example.com")
|
||||
# set an addon license from the available list
|
||||
|
@ -306,8 +306,8 @@ def test_submit_addon_3mb_size_tc_id_c2274214(selenium, base_url, wait, variable
|
|||
details_form.requires_payment.click()
|
||||
# reusables.scroll_into_view(selenium, details_form.categories_section)
|
||||
# set Firefox and Android categories for the addon
|
||||
details_form.select_firefox_categories(0)
|
||||
details_form.select_android_categories(0)
|
||||
details_form.select_categories(0)
|
||||
# details_form.select_android_categories(0)
|
||||
details_form.email_input_field("some-mail@mail.com")
|
||||
details_form.support_site_input_field("https://example.com")
|
||||
# set an addon license from the available list
|
||||
|
@ -448,7 +448,7 @@ def test_submit_unicode_addon_tc_id_c4590(
|
|||
source = submit_addon.click_continue_upload_button()
|
||||
source.select_no_to_omit_source()
|
||||
details_form = source.continue_listed_submission()
|
||||
details_form.select_firefox_categories(0)
|
||||
details_form.select_categories(0)
|
||||
# set an addon license from the available list
|
||||
details_form.select_license_options[0].click()
|
||||
# submit the add-on details
|
||||
|
|
Загрузка…
Ссылка в новой задаче