コード例 #1
0
 def _change_library_content_settings(self, count=1, capa_type=None):
     """
     Performs library block refresh in Studio, configuring it to show {count} children
     """
     unit_page = self._go_to_unit_page(True)
     library_container_block = StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(unit_page.xblocks[1])
     library_container_block.edit()
     editor = StudioLibraryContentEditor(self.browser, library_container_block.locator)
     editor.count = count
     if capa_type is not None:
         editor.capa_type = capa_type
     editor.save()
     self._go_to_unit_page(change_login=False)
     unit_page.wait_for_page()
     unit_page.publish()
     self.assertIn("Published and Live", unit_page.publish_title)
コード例 #2
0
ファイル: test_library.py プロジェクト: sboday/edx-platform
 def _change_library_content_settings(self, count=1, capa_type=None):
     """
     Performs library block refresh in Studio, configuring it to show {count} children
     """
     unit_page = self._go_to_unit_page(True)
     library_container_block = StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(unit_page.xblocks[1])
     library_container_block.edit()
     editor = StudioLibraryContentEditor(self.browser, library_container_block.locator)
     editor.count = count
     if capa_type is not None:
         editor.capa_type = capa_type
     editor.save()
     self._go_to_unit_page(change_login=False)
     unit_page.wait_for_page()
     unit_page.publish_action.click()
     unit_page.wait_for_ajax()
     self.assertIn("Published and Live", unit_page.publish_title)
コード例 #3
0
 def _get_library_xblock_wrapper(self, xblock):
     """
     Wraps xblock into :class:`...pages.studio.library.StudioLibraryContainerXBlockWrapper`
     """
     return StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(xblock)
コード例 #4
0
 def _get_library_xblock_wrapper(self, xblock):
     """
     Wraps xblock into :class:`...pages.studio.library.StudioLibraryContainerXBlockWrapper`
     """
     return StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(xblock)