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


Python SettingsPage.wait_for_page方法代码示例

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


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

示例1: StudioSettingsA11yTest

# 需要导入模块: from common.test.acceptance.pages.studio.settings import SettingsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings.SettingsPage import wait_for_page [as 别名]
class StudioSettingsA11yTest(StudioCourseTest):

    """
    Class to test Studio pages accessibility.
    """

    def setUp(self):  # pylint: disable=arguments-differ
        super(StudioSettingsA11yTest, self).setUp()
        self.settings_page = SettingsPage(self.browser, self.course_info['org'], self.course_info['number'],
                                          self.course_info['run'])

    def test_studio_settings_page_a11y(self):
        """
        Check accessibility of SettingsPage.
        """
        self.settings_page.visit()
        self.settings_page.wait_for_page()

        self.settings_page.a11y_audit.config.set_rules({
            "ignore": [
                'link-href',  # TODO: AC-590
            ],
        })

        self.settings_page.a11y_audit.check_for_accessibility_errors()
开发者ID:AlexxNica,项目名称:edx-platform,代码行数:27,代码来源:test_studio_settings.py

示例2: StudioSettingsA11yTest

# 需要导入模块: from common.test.acceptance.pages.studio.settings import SettingsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings.SettingsPage import wait_for_page [as 别名]
class StudioSettingsA11yTest(StudioCourseTest):

    """
    Class to test Studio pages accessibility.
    """

    def setUp(self):  # pylint: disable=arguments-differ
        super(StudioSettingsA11yTest, self).setUp()
        self.settings_page = SettingsPage(self.browser, self.course_info['org'], self.course_info['number'],
                                          self.course_info['run'])

    def test_studio_settings_page_a11y(self):
        """
        Check accessibility of SettingsPage.
        """
        self.settings_page.visit()
        self.settings_page.wait_for_page()

        self.settings_page.a11y_audit.config.set_rules({
            "ignore": [
                'link-href',  # TODO: AC-590
                'aria-allowed-role',  # TODO: AC-936
                'landmark-complementary-is-top-level',  # TODO: AC-939
                'radiogroup',  # TODO:  AC-941
                'region',  # TODO: AC-932
            ],
        })

        self.settings_page.a11y_audit.check_for_accessibility_errors()
开发者ID:digitalsatori,项目名称:edx-platform,代码行数:31,代码来源:test_studio_settings.py

示例3: StudioSettingsA11yTest

# 需要导入模块: from common.test.acceptance.pages.studio.settings import SettingsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings.SettingsPage import wait_for_page [as 别名]
class StudioSettingsA11yTest(StudioCourseTest):

    """
    Class to test Studio pages accessibility.
    """

    def setUp(self):  # pylint: disable=arguments-differ
        super(StudioSettingsA11yTest, self).setUp()
        self.settings_page = SettingsPage(self.browser, self.course_info['org'], self.course_info['number'],
                                          self.course_info['run'])

    def test_studio_settings_page_a11y(self):
        """
        Check accessibility of SettingsPage.
        """
        self.settings_page.visit()
        self.settings_page.wait_for_page()

        # There are several existing color contrast errors on this page,
        # we will ignore this error in the test until we fix them.
        self.settings_page.a11y_audit.config.set_rules({
            "ignore": [
                'link-href',  # TODO: AC-557
                'icon-aria-hidden',  # TODO: AC-229
            ],
        })

        # TODO: Figure out how to get CodeMirror to pass accessibility testing
        # We use the CodeMirror Javascript library to
        # add code editing to a number of textarea elements
        # on this page. CodeMirror generates markup that does
        # not pass our accessibility testing rules.
        self.settings_page.a11y_audit.config.set_scope(
            exclude=['.CodeMirror textarea']
        )

        self.settings_page.a11y_audit.check_for_accessibility_errors()
开发者ID:chrisndodge,项目名称:edx-platform,代码行数:39,代码来源:test_studio_settings.py


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