From d101291417fd5bb4e876b5f709cade405252449d Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 11:12:04 -0400 Subject: [PATCH 01/13] Remove test_locked_subsections_do_not_appear_in_lms --- .../tests/studio/test_studio_outline.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_studio_outline.py b/common/test/acceptance/tests/studio/test_studio_outline.py index ef1d8ce3a2..ba2cb674c6 100644 --- a/common/test/acceptance/tests/studio/test_studio_outline.py +++ b/common/test/acceptance/tests/studio/test_studio_outline.py @@ -872,27 +872,6 @@ class StaffLockTest(CourseOutlineTest): subsection.unit_at(0).set_staff_lock(True) self.assertFalse(subsection.has_staff_lock_warning) - def test_locked_subsections_do_not_appear_in_lms(self): - """ - Scenario: A locked subsection is not visible to students in the LMS - Given I have a course with two subsections - When I enable explicit staff lock on one subsection - And I click the View Live button to switch to staff view - And I visit the course home with the outline - Then I see two subsections in the outline - And when I switch the view mode to student view - Then I see one subsection in the outline - """ - self.course_outline_page.visit() - self.course_outline_page.section_at(0).subsection_at(1).set_staff_lock(True) - self.course_outline_page.view_live() - - course_home_page = CourseHomePage(self.browser, self.course_id) - course_home_page.visit() - self.assertEqual(course_home_page.outline.num_subsections, 2) - course_home_page.preview.set_staff_view_mode('Learner') - self.assertEqual(course_home_page.outline.num_subsections, 1) - def test_toggling_staff_lock_on_section_does_not_publish_draft_units(self): """ Scenario: Locking and unlocking a section will not publish its draft units From 9f0a79a5e273a8d2c5e795aff9e319a57dd98a0a Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 11:12:59 -0400 Subject: [PATCH 02/13] Remove test_bad_filename_error --- .../test/acceptance/tests/studio/test_import_export.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 5dbc82476f..5880c56e20 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -221,15 +221,6 @@ class ImportTestMixin(object): self.import_page.wait_for_upload() self.assertEqual(self.import_page.finished_target_url(), self.landing_page.url) - def test_bad_filename_error(self): - """ - Scenario: I should be reprimanded for trying to upload something that isn't a .tar.gz file. - Given that I select a file that is an .mp4 for upload - An error message will appear - """ - self.import_page.upload_tarball('funny_cat_video.mp4') - self.import_page.wait_for_filename_error() - def test_bad_import(self): """ Scenario: I should see a failed checklist when uploading an invalid course or library From de31fefbaf4c88af6871ecd8c234cdc8890ce8d6 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 11:13:38 -0400 Subject: [PATCH 03/13] Remove test_import_timestamp --- .../tests/studio/test_import_export.py | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 5880c56e20..6aae98e5f1 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -172,45 +172,6 @@ class ImportTestMixin(object): self.import_page.upload_tarball(self.tarball_name) self.import_page.wait_for_upload() - def test_import_timestamp(self): - """ - Scenario: I perform a course / library import - On import success, the page displays a UTC timestamp previously not visible - And if I refresh the page, the timestamp is still displayed - """ - self.assertFalse(self.import_page.is_timestamp_visible()) - - # Get the time when the import has started. - # import_page timestamp is in (MM/DD/YYYY at HH:mm) so replacing (second, microsecond) to - # keep the comparison consistent - upload_start_time = datetime.utcnow().replace(microsecond=0, second=0) - self.import_page.upload_tarball(self.tarball_name) - self.import_page.wait_for_upload() - - # Get the time when the import has finished. - # import_page timestamp is in (MM/DD/YYYY at HH:mm) so replacing (second, microsecond) to - # keep the comparison consistent - upload_finish_time = datetime.utcnow().replace(microsecond=0, second=0) - - import_timestamp = self.import_page.parsed_timestamp - self.import_page.wait_for_timestamp_visible() - - # Verify that 'import_timestamp' is between start and finish upload time - self.assertLessEqual( - upload_start_time, - import_timestamp, - "Course import timestamp should be upload_start_time <= import_timestamp <= upload_end_time" - ) - self.assertGreaterEqual( - upload_finish_time, - import_timestamp, - "Course import timestamp should be upload_start_time <= import_timestamp <= upload_end_time" - ) - - self.import_page.visit() - self.import_page.wait_for_tasks(completed=True) - self.import_page.wait_for_timestamp_visible() - def test_landing_url(self): """ Scenario: When uploading a library or course, a link appears for me to view the changes. From a60b39e44d341d04b9a2c468be0de21b597b33a0 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 11:14:11 -0400 Subject: [PATCH 04/13] Remove test_multiple_course_import_message --- .../tests/studio/test_import_export.py | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 6aae98e5f1..83a01b2a39 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -250,34 +250,6 @@ class TestCourseImport(ImportTestMixin, StudioCourseTest): """ self.assertEqual(self.import_page.header_text, 'Course Import') - def test_multiple_course_import_message(self): - """ - Given that I visit an empty course before import - When I visit the import page - And I upload a course with file name 2015.lzdwNM.tar.gz - Then timestamp is visible after course is updated successfully - And then I create a new course - When I visit the import page of this new course - Then timestamp is not visible - """ - self.import_page.visit() - self.import_page.upload_tarball(self.tarball_name) - self.import_page.wait_for_upload() - self.assertTrue(self.import_page.is_timestamp_visible()) - - # Create a new course and visit the import page - self.course_info = { - 'org': 'orgX', - 'number': self.unique_id + '_2', - 'run': 'test_run_2', - 'display_name': 'Test Course 2' + self.unique_id - } - self.install_course_fixture() - self.import_page = self.import_page_class(*self.page_args()) - self.import_page.visit() - # As this is new course which is never import so timestamp should not present - self.assertFalse(self.import_page.is_timestamp_visible()) - @attr(shard=7) class TestLibraryImport(ImportTestMixin, StudioLibraryTest): From 33236b90e70188e527a4e34ab5c25b44e97981f0 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 11:14:54 -0400 Subject: [PATCH 05/13] Remove test_register_failure --- common/test/acceptance/tests/lms/test_lms.py | 25 -------------------- 1 file changed, 25 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py index 16fe2f36e9..fd73b7f9a6 100644 --- a/common/test/acceptance/tests/lms/test_lms.py +++ b/common/test/acceptance/tests/lms/test_lms.py @@ -297,31 +297,6 @@ class RegisterFromCombinedPageTest(UniqueCourseTest): self.course_info['run'], self.course_info['display_name'] ).install() - def test_register_failure(self): - # Navigate to the registration page - self.register_page.visit() - - # Enter a blank for the username field, which is required - # Don't agree to the terms of service / honor code. - # Don't specify a country code, which is required. - # Don't specify a favorite movie. - username = "test_{uuid}".format(uuid=self.unique_id[0:6]) - email = "{user}@example.com".format(user=username) - self.register_page.register( - email=email, - password="password", - username="", - full_name="Test User", - terms_of_service=False - ) - - # Verify that the expected errors are displayed. - errors = self.register_page.wait_for_errors() - self.assertIn(u'Please enter your Public Username.', errors) - self.assertIn(u'You must agree to the édX Terms of Service and Honor Code', errors) - self.assertIn(u'Select your country or region of residence.', errors) - self.assertIn(u'Please tell us your favorite movie.', errors) - def test_toggle_to_login_form(self): self.register_page.visit().toggle_form() self.assertEqual(self.register_page.current_form, "login") From b192fe50b6d1e9e5b4488c12084f556b595f0220 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 13:54:26 -0400 Subject: [PATCH 06/13] remove test_as_specific_student --- .../tests/lms/test_lms_user_preview.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_lms_user_preview.py b/common/test/acceptance/tests/lms/test_lms_user_preview.py index 3d21cc08a8..6b3225b030 100644 --- a/common/test/acceptance/tests/lms/test_lms_user_preview.py +++ b/common/test/acceptance/tests/lms/test_lms_user_preview.py @@ -414,23 +414,6 @@ class CourseWithContentGroupsTest(StaffViewTest): add_cohort_with_student("Cohort Beta", "beta", student_b_username) cohort_management_page.wait_for_ajax() - @attr(shard=3) - def test_as_specific_student(self): - student_a_username = 'tass_student_a' - student_b_username = 'tass_student_b' - AutoAuthPage(self.browser, username=student_a_username, course_id=self.course_id, no_login=True).visit() - AutoAuthPage(self.browser, username=student_b_username, course_id=self.course_id, no_login=True).visit() - self.create_cohorts_and_assign_students(student_a_username, student_b_username) - - # Masquerade as learner in alpha cohort: - course_page = self._goto_staff_page() - course_page.set_staff_view_mode_specific_student(student_a_username) - verify_expected_problem_visibility(self, course_page, [self.alpha_text, self.audit_text, self.everyone_text]) - - # Masquerade as learner in beta cohort: - course_page.set_staff_view_mode_specific_student(student_b_username) - verify_expected_problem_visibility(self, course_page, [self.beta_text, self.audit_text, self.everyone_text]) - @attr('a11y') def test_course_page(self): """ From 405d40dc1900c5a6377f2d6e07e39fb26c021c11 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 13:55:12 -0400 Subject: [PATCH 07/13] remove test_landing_page --- .../test/acceptance/tests/studio/test_import_export.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 83a01b2a39..24844f5fbd 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -172,16 +172,6 @@ class ImportTestMixin(object): self.import_page.upload_tarball(self.tarball_name) self.import_page.wait_for_upload() - def test_landing_url(self): - """ - Scenario: When uploading a library or course, a link appears for me to view the changes. - Given that I upload a library or course - A button will appear that contains the URL to the library or course's main page - """ - self.import_page.upload_tarball(self.tarball_name) - self.import_page.wait_for_upload() - self.assertEqual(self.import_page.finished_target_url(), self.landing_page.url) - def test_bad_import(self): """ Scenario: I should see a failed checklist when uploading an invalid course or library From f734cb8d15489cc64c5dd828b53d4f4ec28769cb Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 15:52:27 -0400 Subject: [PATCH 08/13] Remove test_library_updated --- .../tests/studio/test_import_export.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 24844f5fbd..c1fa4b8e53 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -254,27 +254,6 @@ class TestLibraryImport(ImportTestMixin, StudioLibraryTest): def page_args(self): return [self.browser, self.library_key] - def test_library_updated(self): - """ - Given that I visit an empty library - No XBlocks should be shown - When I visit the import page - And I upload a library that contains three XBlocks - And I visit the library page - Three XBlocks should be shown - """ - self.landing_page.visit() - self.landing_page.wait_until_ready() - # No items should be in the library to start. - self.assertEqual(len(self.landing_page.xblocks), 0) - self.import_page.visit() - self.import_page.upload_tarball(self.tarball_name) - self.import_page.wait_for_upload() - self.landing_page.visit() - self.landing_page.wait_until_ready() - # There are three blocks in the tarball. - self.assertEqual(len(self.landing_page.xblocks), 3) - def test_header(self): """ Scenario: I should see the correct text when importing a library. From 710d6e5c3d8a7c191fc54e24fbaeb1d159bf4ff3 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 15:53:13 -0400 Subject: [PATCH 09/13] Remove test_course_updated --- .../tests/studio/test_import_export.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index c1fa4b8e53..e1b2ccf5ca 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -212,25 +212,6 @@ class TestCourseImport(ImportTestMixin, StudioCourseTest): def page_args(self): return [self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run']] - def test_course_updated(self): - """ - Given that I visit an empty course before import - I should not see a section named 'Section' - When I visit the import page - And I upload a course that has a section named 'Section' - And I visit the course outline page again - The section named 'Section' should now be available - """ - self.landing_page.visit() - # Should not exist yet. - self.assertRaises(IndexError, self.landing_page.section, "Section") - self.import_page.visit() - self.import_page.upload_tarball(self.tarball_name) - self.import_page.wait_for_upload() - self.landing_page.visit() - # There's a section named 'Section' in the tarball. - self.landing_page.section("Section") - def test_header(self): """ Scenario: I should see the correct text when importing a course. From d46233eee19c7b609c3e157cc70da2452a7bbea9 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 15:53:51 -0400 Subject: [PATCH 10/13] Remove test_upload --- .../acceptance/tests/studio/test_import_export.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index e1b2ccf5ca..3697819937 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -161,17 +161,6 @@ class ImportTestMixin(object): """ return [] - def test_upload(self): - """ - Scenario: I want to upload a course or library for import. - Given that I have a library or course to import into - And I have a valid .tar.gz file containing data to replace it with - I can select the file and upload it - And the page will give me confirmation that it uploaded successfully - """ - self.import_page.upload_tarball(self.tarball_name) - self.import_page.wait_for_upload() - def test_bad_import(self): """ Scenario: I should see a failed checklist when uploading an invalid course or library From 6a04b4216648fdaef37db27d8483078b336e0100 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 16:10:20 -0400 Subject: [PATCH 11/13] Remove test_restricted_sections_for_enrollment_track_users_in_lms --- .../tests/studio/test_studio_outline.py | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_studio_outline.py b/common/test/acceptance/tests/studio/test_studio_outline.py index ba2cb674c6..a2330e2695 100644 --- a/common/test/acceptance/tests/studio/test_studio_outline.py +++ b/common/test/acceptance/tests/studio/test_studio_outline.py @@ -602,45 +602,6 @@ class UnitAccessTest(CourseOutlineTest): staff_page.wait_for_page() self.assertEqual(course_home_page.outline.num_units, 2) - def test_restricted_sections_for_enrollment_track_users_in_lms(self): - """ - Verify that those who are in an enrollment track with access to a restricted unit are able - to see that unit in lms, and those who are in an enrollment track without access to a restricted - unit are not able to see that unit in lms - """ - # Add just 1 enrollment track to verify the enrollment option isn't available in the modal - add_enrollment_course_modes(self.browser, self.course_id, ["audit"]) - self.course_outline_page.visit() - self.course_outline_page.expand_all_subsections() - unit = self.course_outline_page.section_at(0).subsection_at(0).unit_at(0) - enrollment_select_options = unit.get_enrollment_select_options() - self.assertFalse('Enrollment Track Groups' in enrollment_select_options) - - # Add the additional enrollment track so the unit access toggles should now be available - add_enrollment_course_modes(self.browser, self.course_id, ["verified"]) - self.course_outline_page.visit() - self.course_outline_page.expand_all_subsections() - unit = self.course_outline_page.section_at(0).subsection_at(0).unit_at(0) - unit.toggle_unit_access('Enrollment Track Groups', [1]) # Hard coded 1 for audit ID - self.course_outline_page.view_live() - - course_home_page = CourseHomePage(self.browser, self.course_id) - course_home_page.visit() - course_home_page.resume_course_from_header() - self.assertEqual(course_home_page.outline.num_units, 2) - - # Test for a user without additional content available - staff_page = StaffCoursewarePage(self.browser, self.course_id) - staff_page.set_staff_view_mode('Learner in Verified') - staff_page.wait_for_page() - self.assertEqual(course_home_page.outline.num_units, 1) - - # Test for a user with additional content available - staff_page = StaffCoursewarePage(self.browser, self.course_id) - staff_page.set_staff_view_mode('Learner in Audit') - staff_page.wait_for_page() - self.assertEqual(course_home_page.outline.num_units, 2) - @attr(shard=3) class StaffLockTest(CourseOutlineTest): From 92d019e419d952f9e5a05d60a07548ae5e46ef40 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 16:11:39 -0400 Subject: [PATCH 12/13] Remove test_about_me_field --- .../tests/lms/test_learner_profile.py | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_learner_profile.py b/common/test/acceptance/tests/lms/test_learner_profile.py index 086d6a5cb2..46ae742ac7 100644 --- a/common/test/acceptance/tests/lms/test_learner_profile.py +++ b/common/test/acceptance/tests/lms/test_learner_profile.py @@ -348,41 +348,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, AcceptanceTest): self.assertEqual(profile_page.get_non_editable_mode_value(field_id), displayed_value) self.assertTrue(profile_page.mode_for_field(field_id), mode) - def test_about_me_field(self): - """ - Test behaviour of `About Me` field. - - Given that I am a registered user. - And I visit my Profile page. - And I set the profile visibility to public and set default values for public fields. - Then I set about me value to `ThisIsIt`. - Then displayed about me should be `ThisIsIt` and about me field mode should be `display` - And I reload the page. - Then displayed about me should be `ThisIsIt` and about me field mode should be `display` - Then I set empty value for about me. - Then displayed about me should be `Tell other edX learners a little about yourself: where you live, - what your interests are, why you're taking courses on edX, or what you hope to learn.` and about me - field mode should be `placeholder` - And I reload the page. - Then displayed about me should be `Tell other edX learners a little about yourself: where you live, - what your interests are, why you're taking courses on edX, or what you hope to learn.` and about me - field mode should be `placeholder` - And I make `about me` field editable - Then `about me` field mode should be `edit` - """ - placeholder_value = ( - "Tell other learners a little about yourself: where you live, what your interests are, " - "why you're taking courses, or what you hope to learn." - ) - - username, __ = self.log_in_as_unique_user() - profile_page = self.visit_profile_page(username, privacy=self.PRIVACY_PUBLIC) - self._test_textarea_field(profile_page, 'bio', 'ThisIsIt', 'ThisIsIt', 'display') - self._test_textarea_field(profile_page, 'bio', '', placeholder_value, 'placeholder') - - profile_page.make_field_editable('bio') - self.assertTrue(profile_page.mode_for_field('bio'), 'edit') - def test_birth_year_not_set(self): """ Verify message if birth year is not set. From d4afacb9b28d1ed9e11a8c4188fbe593cc608730 Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Fri, 23 Mar 2018 16:40:04 -0400 Subject: [PATCH 13/13] Remove test_bad_import --- .../acceptance/tests/studio/test_import_export.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 3697819937..d6837bf752 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -161,18 +161,6 @@ class ImportTestMixin(object): """ return [] - def test_bad_import(self): - """ - Scenario: I should see a failed checklist when uploading an invalid course or library - Given that I am on an import page - And I upload a tarball with a broken XML file - The tasks should be confirmed up until the 'Updating' task - And the 'Updating' task should be marked failed - And the remaining tasks should not be marked as started - """ - self.import_page.upload_tarball(self.bad_tarball_name) - self.import_page.wait_for_tasks(fail_on='Updating') - @attr(shard=7) class TestEntranceExamCourseImport(ImportTestMixin, StudioCourseTest):