From 44bcf4e87e1da7716dda602309f592fc341c9a9b Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 27 Feb 2020 16:19:35 -0500 Subject: [PATCH] Remove low value video license test. --- .../tests/video/test_video_license.py | 121 ------------------ 1 file changed, 121 deletions(-) delete mode 100644 common/test/acceptance/tests/video/test_video_license.py diff --git a/common/test/acceptance/tests/video/test_video_license.py b/common/test/acceptance/tests/video/test_video_license.py deleted file mode 100644 index 81be34bbbb..0000000000 --- a/common/test/acceptance/tests/video/test_video_license.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 -""" -Acceptance tests for licensing of the Video module -""" - - -from common.test.acceptance.fixtures.course import XBlockFixtureDesc -from common.test.acceptance.pages.lms.courseware import CoursewarePage -from common.test.acceptance.pages.studio.overview import CourseOutlinePage -from common.test.acceptance.tests.studio.base_studio_test import StudioCourseTest - - -class VideoLicenseTest(StudioCourseTest): - """ - Tests for video module-level licensing (that is, setting the license, - for a specific video module, to All Rights Reserved or Creative Commons) - """ - shard = 22 - - def setUp(self): # pylint: disable=arguments-differ - super(VideoLicenseTest, self).setUp() - - self.lms_courseware = CoursewarePage( - self.browser, - self.course_id, - ) - self.studio_course_outline = CourseOutlinePage( - self.browser, - self.course_info['org'], - self.course_info['number'], - self.course_info['run'] - ) - - # used by StudioCourseTest.setUp() - def populate_course_fixture(self, course_fixture): - """ - Create a course with a single chapter. - That chapter has a single section. - That section has a single vertical. - That vertical has a single video element. - """ - video_block = XBlockFixtureDesc('video', "Test Video") - vertical = XBlockFixtureDesc('vertical', "Test Vertical") - vertical.add_children(video_block) - sequential = XBlockFixtureDesc('sequential', "Test Section") - sequential.add_children(vertical) - chapter = XBlockFixtureDesc('chapter', "Test Chapter") - chapter.add_children(sequential) - self.course_fixture.add_children(chapter) - - def test_empty_license(self): - """ - When I visit the LMS courseware, - I can see that the video is present - but it has no license displayed by default. - """ - self.lms_courseware.visit() - video = self.lms_courseware.q(css=".vert .xblock .video") - self.assertTrue(video.is_present()) - video_license = self.lms_courseware.q(css=".vert .xblock.xmodule_VideoBlock .xblock-license") - self.assertFalse(video_license.is_present()) - - def test_arr_license(self): - """ - When I edit a video element in Studio, - I can set an "All Rights Reserved" license on that video element. - When I visit the LMS courseware, - I can see that the video is present - and that it has "All Rights Reserved" displayed for the license. - """ - self.studio_course_outline.visit() - subsection = self.studio_course_outline.section_at(0).subsection_at(0) - subsection.expand_subsection() - unit = subsection.unit_at(0) - container_page = unit.go_to() - container_page.edit() - video = [xb for xb in container_page.xblocks if xb.name == "Test Video"][0] - video.open_advanced_tab() - video.set_license('all-rights-reserved') - video.save_settings() - container_page.publish() - - self.lms_courseware.visit() - video = self.lms_courseware.q(css=".vert .xblock .video") - self.assertTrue(video.is_present()) - video_license_css = ".vert .xblock.xmodule_VideoBlock .xblock-license" - self.lms_courseware.wait_for_element_presence( - video_license_css, "Video module license block is present" - ) - video_license = self.lms_courseware.q(css=video_license_css) - self.assertEqual(video_license.text[0], "© All Rights Reserved") - - def test_cc_license(self): - """ - When I edit a video element in Studio, - I can set a "Creative Commons" license on that video element. - When I visit the LMS courseware, - I can see that the video is present - and that it has "Some Rights Reserved" displayed for the license. - """ - self.studio_course_outline.visit() - subsection = self.studio_course_outline.section_at(0).subsection_at(0) - subsection.expand_subsection() - unit = subsection.unit_at(0) - container_page = unit.go_to() - container_page.edit() - video = [xb for xb in container_page.xblocks if xb.name == "Test Video"][0] - video.open_advanced_tab() - video.set_license('creative-commons') - video.save_settings() - container_page.publish() - - self.lms_courseware.visit() - video = self.lms_courseware.q(css=".vert .xblock .video") - self.assertTrue(video.is_present()) - video_license_css = ".vert .xblock.xmodule_VideoBlock .xblock-license" - self.lms_courseware.wait_for_element_presence( - video_license_css, "Video module license block is present" - ) - video_license = self.lms_courseware.q(css=video_license_css) - self.assertIn("Some Rights Reserved", video_license.text[0])