class TestCourseBadExport(BadExportMixin, StudioCourseTest): """ Verify exporting a bad course causes an error. """ ready_method = 'wait_for_component_menu' def setUp(self): # pylint: disable=arguments-differ super(TestCourseBadExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'], ) self.edit_page = ContainerPage(self.browser, self.unit.locator) self.export_page.visit() def populate_course_fixture(self, course_fixture): """ Populate the course with a unit that has a bad problem. """ self.unit = XBlockFixtureDesc('vertical', 'Unit') course_fixture.add_children( XBlockFixtureDesc('chapter', 'Main Section').add_children( XBlockFixtureDesc('sequential', 'Subsection').add_children( self.unit.add_children( XBlockFixtureDesc("problem", "Bad Problem", data='<') ) ) ) )
def setUp(self): # pylint: disable=arguments-differ super(TestCourseExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'], ) self.export_page.visit()
class TestCourseBadExport(BadExportMixin, StudioCourseTest): """ Verify exporting a bad course causes an error. """ ready_method = "wait_for_component_menu" def setUp(self): # pylint: disable=arguments-differ super(TestCourseBadExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info["org"], self.course_info["number"], self.course_info["run"] ) self.edit_page = ContainerPage(self.browser, self.unit.locator) self.export_page.visit() def populate_course_fixture(self, course_fixture): """ Populate the course with a unit that has a bad problem. """ self.unit = XBlockFixtureDesc("vertical", "Unit") course_fixture.add_children( XBlockFixtureDesc("chapter", "Main Section").add_children( XBlockFixtureDesc("sequential", "Subsection").add_children( self.unit.add_children(XBlockFixtureDesc("problem", "Bad Problem", data="<")) ) ) )
def setUp(self): # pylint: disable=arguments-differ super(TestCourseBadExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'], ) self.edit_page = ContainerPage(self.browser, self.unit.locator) self.export_page.visit()
class ToolsExportHelpTest(StudioCourseTest): """ Tests help links on tools export pages. """ def setUp(self, is_staff=False, test_xss=True): super(ToolsExportHelpTest, self).setUp() self.export_page = ExportCoursePage(self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run']) self.export_page.visit() @skip( "Disabled as edx.org help links are now different than Open edX (@catong can advise)" ) def test_tools_import_nav_help(self): """ Scenario: Help link in navigation bar is working on tools Library export page Given that I am on the Library export tools 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 be correct """ expected_url = _get_expected_documentation_url( '/releasing_course/export_import_course.html#export-a-course') # Assert that help link is correct. assert_nav_help_link( test=self, page=self.export_page, href=expected_url, ) @skip( "Disabled as edx.org help links are now different than Open edX (@catong can advise)" ) def test_tools_import_side_bar_help(self): """ Scenario: Help link in side bar is working on tools Library export page Given that I am on the tools Library import page And I want help about the process And I click the 'Learn more about exporting a course' in the sidebar links Then Help link should open. And help url should be correct """ expected_url = _get_expected_documentation_url( '/releasing_course/export_import_course.html#export-a-course') # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.export_page, href=expected_url, help_text='Learn more about exporting a course', )
def setUp(self, is_staff=False, test_xss=True): super(ToolsExportHelpTest, self).setUp() self.export_page = ExportCoursePage(self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run']) self.export_page.visit()
class ToolsExportHelpTest(StudioCourseTest): """ Tests help links on tools export pages. """ def setUp(self, is_staff=False, test_xss=True): super(ToolsExportHelpTest, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'] ) self.export_page.visit() def test_tools_import_nav_help(self): """ Scenario: Help link in navigation bar is working on tools Library export page Given that I am on the Library export tools 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 'releasing_course/export_import_course.html#export-a-course' """ href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \ 'open-release-ficus.master/releasing_course/export_import_course.html#export-a-course' # Assert that help link is correct. assert_nav_help_link( test=self, page=self.export_page, href=href ) def test_tools_import_side_bar_help(self): """ Scenario: Help link in side bar is working on tools Library export page Given that I am on the tools Library import page And I want help about the process And I click the 'Learn more about exporting a course' in the sidebar links Then Help link should open. And help url should end with 'releasing_course/export_import_course.html#export-a-course' """ href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \ 'open-release-ficus.master/releasing_course/export_import_course.html#export-a-course' # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.export_page, href=href, help_text='Learn more about exporting a course', )
class ToolsExportHelpTest(StudioCourseTest): """ Tests help links on tools export pages. """ def setUp(self, is_staff=False, test_xss=True): super(ToolsExportHelpTest, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'] ) self.export_page.visit() def test_tools_import_nav_help(self): """ Scenario: Help link in navigation bar is working on tools Library export page Given that I am on the Library export tools 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 be correct """ expected_url = _get_expected_documentation_url('/releasing_course/export_import_course.html#export-a-course') # Assert that help link is correct. assert_nav_help_link( test=self, page=self.export_page, href=expected_url, ) def test_tools_import_side_bar_help(self): """ Scenario: Help link in side bar is working on tools Library export page Given that I am on the tools Library import page And I want help about the process And I click the 'Learn more about exporting a course' in the sidebar links Then Help link should open. And help url should be correct """ expected_url = _get_expected_documentation_url('/releasing_course/export_import_course.html#export-a-course') # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.export_page, href=expected_url, help_text='Learn more about exporting a course', )
class ToolsExportHelpTest(StudioCourseTest): """ Tests help links on tools export pages. """ def setUp(self, is_staff=False, test_xss=True): super(ToolsExportHelpTest, self).setUp() self.export_page = ExportCoursePage(self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run']) self.export_page.visit() def test_tools_import_nav_help(self): """ Scenario: Help link in navigation bar is working on tools Library export page Given that I am on the Library export tools 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 'releasing_course/export_import_course.html#export-a-course' """ href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \ 'latest/releasing_course/export_import_course.html#export-a-course' # Assert that help link is correct. assert_nav_help_link(test=self, page=self.export_page, href=href) def test_tools_import_side_bar_help(self): """ Scenario: Help link in side bar is working on tools Library export page Given that I am on the tools Library import page And I want help about the process And I click the 'Learn more about exporting a course' in the sidebar links Then Help link should open. And help url should end with 'releasing_course/export_import_course.html#export-a-course' """ href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \ 'latest/releasing_course/export_import_course.html#export-a-course' # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.export_page, href=href, help_text='Learn more about exporting a course', )
def setUp(self): # pylint: disable=arguments-differ super(TestCourseBadExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info["org"], self.course_info["number"], self.course_info["run"] ) self.edit_page = ContainerPage(self.browser, self.unit.locator) self.export_page.visit()
def setUp(self, is_staff=False, test_xss=True): super(ToolsExportHelpTest, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info["org"], self.course_info["number"], self.course_info["run"] ) self.export_page.visit()
class TestCourseExport(ExportTestMixin, StudioCourseTest): """ Export tests for courses. """ def setUp(self): # pylint: disable=arguments-differ super(TestCourseExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'], ) self.export_page.visit() def test_header(self): """ Scenario: I should see the correct text when exporting a course. Given that I have a course to export from When I visit the export page The correct header should be shown """ self.assertEqual(self.export_page.header_text, 'Course Export')
def setUp(self): # pylint: disable=arguments-differ super(TestCourseExport, self).setUp() self.export_page = ExportCoursePage( self.browser, self.course_info["org"], self.course_info["number"], self.course_info["run"] ) self.export_page.visit()