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


Python ExportLibraryPage.visit方法代码示例

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


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

示例1: LibraryExportHelpTest

# 需要导入模块: from common.test.acceptance.pages.studio.import_export import ExportLibraryPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.import_export.ExportLibraryPage import visit [as 别名]
class LibraryExportHelpTest(StudioLibraryTest):
    """
    Test help links on a Library export pages.
    """
    def setUp(self):
        super(LibraryExportHelpTest, self).setUp()
        self.library_export_page = ExportLibraryPage(self.browser, self.library_key)
        self.library_export_page.visit()

    def test_library_export_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on Library export page.
        Given that I am on the Library export page.
        And I want help about the process
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should end with 'creating_content/libraries.html#export-a-library'
        """
        # The href we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \
               'open-release-ficus.master/course_components/libraries.html#export-a-library'

        # Assert that help link is correct.
        assert_nav_help_link(
            test=self,
            page=self.library_export_page,
            href=href
        )

    def test_library_export_side_bar_help(self):
        """
        Scenario: Help link in sidebar links is working on Library export page.
        Given that I am on the Library export page.
        And I want help about the process
        And I click the 'Learn more about exporting a library' in the sidebar links
        Then Help link should open.
        And help url should end with 'creating_content/libraries.html#export-a-library'
        """
        # The href we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \
               'open-release-ficus.master/course_components/libraries.html#export-a-library'

        # Assert that help link is correct.
        assert_side_bar_help_link(
            test=self,
            page=self.library_export_page,
            href=href,
            help_text='Learn more about exporting a library'
        )
开发者ID:caesar2164,项目名称:edx-platform,代码行数:51,代码来源:test_studio_help.py

示例2: TestLibraryExport

# 需要导入模块: from common.test.acceptance.pages.studio.import_export import ExportLibraryPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.import_export.ExportLibraryPage import visit [as 别名]
class TestLibraryExport(ExportTestMixin, StudioLibraryTest):
    """
    Export tests for libraries.
    """
    def setUp(self):
        """
        Ensure a library exists and navigate to the library edit page.
        """
        super(TestLibraryExport, self).setUp()
        self.export_page = ExportLibraryPage(self.browser, self.library_key)
        self.export_page.visit()

    def test_header(self):
        """
        Scenario: I should see the correct text when exporting a library.
            Given that I have a library to export from
            When I visit the export page
            The correct header should be shown
        """
        self.assertEqual(self.export_page.header_text, 'Library Export')
开发者ID:Colin-Fredericks,项目名称:edx-platform,代码行数:22,代码来源:test_import_export.py


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