Merge pull request #12317 from edx/douglashall/decorate_flaky_studio_settings_image_upload_tests
Fix flaky Studio settings page image upload acceptance tests
This commit is contained in:
@@ -261,12 +261,15 @@ class SettingsPage(CoursePage):
|
||||
# Return the joined path of the required asset.
|
||||
return os.sep.join(folders_list_in_path)
|
||||
|
||||
def upload_image(self, image_selector, file_to_upload):
|
||||
def upload_image(self, upload_btn_selector, file_to_upload):
|
||||
"""
|
||||
Upload image specified by image_selector and file_to_upload
|
||||
"""
|
||||
|
||||
self.q(css=image_selector).results[0].click()
|
||||
# wait for upload button
|
||||
self.wait_for_element_presence(upload_btn_selector, 'upload button is present')
|
||||
|
||||
self.q(css=upload_btn_selector).results[0].click()
|
||||
|
||||
# wait for popup
|
||||
self.wait_for_element_presence(self.upload_image_popup_window_selector, 'upload dialog is present')
|
||||
|
||||
Reference in New Issue
Block a user