当前位置: 首页>>代码示例>>Python>>正文


Python SettingsPage.wait_for_jquery_value方法代码示例

本文整理汇总了Python中common.test.acceptance.pages.studio.settings.SettingsPage.wait_for_jquery_value方法的典型用法代码示例。如果您正苦于以下问题:Python SettingsPage.wait_for_jquery_value方法的具体用法?Python SettingsPage.wait_for_jquery_value怎么用?Python SettingsPage.wait_for_jquery_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common.test.acceptance.pages.studio.settings.SettingsPage的用法示例。


在下文中一共展示了SettingsPage.wait_for_jquery_value方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: StudioSettingsImageUploadTest

# 需要导入模块: from common.test.acceptance.pages.studio.settings import SettingsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings.SettingsPage import wait_for_jquery_value [as 别名]
class StudioSettingsImageUploadTest(StudioCourseTest):
    """
    Class to test course settings image uploads.
    """
    def setUp(self):  # pylint: disable=arguments-differ
        super(StudioSettingsImageUploadTest, self).setUp()
        self.settings_page = SettingsPage(self.browser, self.course_info['org'], self.course_info['number'],
                                          self.course_info['run'])
        self.settings_page.visit()

        # Ensure jquery is loaded before running a jQuery
        self.settings_page.wait_for_ajax()
        # This text appears towards the end of the work that jQuery is performing on the page
        self.settings_page.wait_for_jquery_value('input#course-name:text', 'test_run')

    def test_upload_course_card_image(self):

        # upload image
        file_to_upload = 'image.jpg'
        self.settings_page.upload_image('#upload-course-image', file_to_upload)
        self.assertIn(file_to_upload, self.settings_page.get_uploaded_image_path('#course-image'))

    def test_upload_course_banner_image(self):

        # upload image
        file_to_upload = 'image.jpg'
        self.settings_page.upload_image('#upload-banner-image', file_to_upload)
        self.assertIn(file_to_upload, self.settings_page.get_uploaded_image_path('#banner-image'))

    def test_upload_course_video_thumbnail_image(self):

        # upload image
        file_to_upload = 'image.jpg'
        self.settings_page.upload_image('#upload-video-thumbnail-image', file_to_upload)
        self.assertIn(file_to_upload, self.settings_page.get_uploaded_image_path('#video-thumbnail-image'))
开发者ID:AlexxNica,项目名称:edx-platform,代码行数:37,代码来源:test_studio_settings.py


注:本文中的common.test.acceptance.pages.studio.settings.SettingsPage.wait_for_jquery_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。