From f1c24bf5ae8ee35c3f46725434b5fec3aab4ef71 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 25 Feb 2020 14:57:10 -0500 Subject: [PATCH] Remove BatchBetaTesters and EntranceExamGrade related UI tests. The batch feature is unlikely to change and hits a tested backend API. The EntranceExam is not a sufficiently highly used test to warrante the expense of UI tests. --- .../lms/test_lms_instructor_dashboard.py | 199 ------------------ 1 file changed, 199 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index 38ca243969..8bedfa1f72 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -17,7 +17,6 @@ from common.test.acceptance.pages.lms.courseware import CoursewarePage from common.test.acceptance.pages.lms.create_mode import ModeCreationPage from common.test.acceptance.pages.lms.dashboard import DashboardPage from common.test.acceptance.pages.lms.instructor_dashboard import ( - EntranceExamAdmin, InstructorDashboardPage, StudentAdminPage, StudentSpecificAdmin @@ -243,56 +242,6 @@ class AutoEnrollmentWithCSVTest(BaseInstructorDashboardTest): self.auto_enroll_section.a11y_audit.check_for_accessibility_errors() -class BatchBetaTestersTest(BaseInstructorDashboardTest): - """ - End-to-end tests for Batch beta testers functionality. - """ - shard = 23 - - def setUp(self): - super(BatchBetaTestersTest, self).setUp() - self.username = "test_{uuid}".format(uuid=self.unique_id[0:6]) - self.email = "{user}@example.com".format(user=self.username) - AutoAuthPage(self.browser, username=self.username, email=self.email, is_active=False).visit() - self.course_fixture = CourseFixture(**self.course_info).install() - self.instructor_username = self.log_in_as_instructor() - instructor_dashboard_page = self.visit_instructor_dashboard() - self.batch_beta_tester_section = instructor_dashboard_page.select_membership().batch_beta_tester_addition() - self.inactive_user_message = 'These users could not be added as beta testers ' \ - 'because their accounts are not yet activated:' - - def test_enroll_inactive_beta_tester(self): - """ - Scenario: On the Membership tab of the Instructor Dashboard, Batch Beta tester div is visible. - Given that I am on the Membership tab on the Instructor Dashboard - Then I enter the username and add it into beta testers. - Then I see the inactive user is not added in beta testers. - """ - self.batch_beta_tester_section.fill_batch_beta_tester_addition_text_box(self.username) - header_text, username = self.batch_beta_tester_section.get_notification_text() - self.assertIn(self.inactive_user_message, header_text[0]) - self.assertEqual(self.username, username[0]) - - def test_enroll_active_and_inactive_beta_tester(self): - """ - Scenario: On the Membership tab of the Instructor Dashboard, Batch Beta tester div is visible. - Given that I am on the Membership tab on the Instructor Dashboard - Then I enter the active and inactive usernames and add it into beta testers. - Then I see the different messages related to active and inactive users. - """ - active_and_inactive_username = self.username + ',' + self.instructor_username[0] - self.batch_beta_tester_section.fill_batch_beta_tester_addition_text_box(active_and_inactive_username) - header_text, username = self.batch_beta_tester_section.get_notification_text() - - # Verify that Inactive username and message. - self.assertIn(self.inactive_user_message, header_text[1]) - self.assertEqual(self.username, username[1]) - - # Verify that active username and message. - self.assertIn('These users were successfully added as beta testers:', header_text[0]) - self.assertEqual(self.instructor_username[0], username[0]) - - @attr(shard=10) class ProctoredExamsTest(BaseInstructorDashboardTest): """ @@ -435,154 +384,6 @@ class ProctoredExamsTest(BaseInstructorDashboardTest): self.assertFalse(exam_attempts_section.is_student_attempt_visible) -@attr(shard=10) -@ddt.ddt -class EntranceExamGradeTest(BaseInstructorDashboardTest): - """ - Tests for Entrance exam specific student grading tasks. - """ - admin_buttons = ( - 'reset_attempts_button', - 'rescore_button', - 'rescore_if_higher_button', - 'delete_state_button', - ) - - def setUp(self): - super(EntranceExamGradeTest, self).setUp() - self.course_info.update({"settings": {"entrance_exam_enabled": "true"}}) - CourseFixture(**self.course_info).install() - self.student_identifier = "johndoe_saee@example.com" - # Create the user (automatically logs us in) - AutoAuthPage( - self.browser, - username="johndoe_saee", - email=self.student_identifier, - course_id=self.course_id, - staff=False - ).visit() - - LogoutPage(self.browser).visit() - - # go to the student admin page on the instructor dashboard - self.log_in_as_instructor() - self.entrance_exam_admin = self.visit_instructor_dashboard().select_student_admin(EntranceExamAdmin) - - def test_input_text_and_buttons_are_visible(self): - """ - Scenario: On the Student admin tab of the Instructor Dashboard, Student Email input box, - Reset Student Attempt, Rescore Student Submission, Delete Student State for entrance exam - and Show Background Task History for Student buttons are visible - Given that I am on the Student Admin tab on the Instructor Dashboard - Then I see Student Email input box, Reset Student Attempt, Rescore Student Submission, - Delete Student State for entrance exam and Show Background Task History for Student buttons - """ - self.assertTrue(self.entrance_exam_admin.are_all_buttons_visible()) - - @ddt.data(*admin_buttons) - def test_admin_button_without_email_shows_error(self, button_to_test): - """ - Scenario: Clicking on the requested button without entering student email - address or username results in error. - Given that I am on the Student Admin tab on the Instructor Dashboard - When I click the requested button under Entrance Exam Grade - Adjustment without enter an email address - Then I should be shown an Error Notification - And The Notification message should read 'Please enter a student email address or username.' - """ - getattr(self.entrance_exam_admin, button_to_test).click() - self.assertEqual( - 'Please enter a student email address or username.', - self.entrance_exam_admin.top_notification.text[0] - ) - - @ddt.data(*admin_buttons) - def test_admin_button_with_success(self, button_to_test): - """ - Scenario: Clicking on the requested button with valid student email - address or username should result in success prompt. - Given that I am on the Student Admin tab on the Instructor Dashboard - When I click the requested button under Entrance Exam Grade - Adjustment after entering a valid student - email address or username - Then I should be shown an alert with success message - """ - self.entrance_exam_admin.set_student_email_or_username(self.student_identifier) - getattr(self.entrance_exam_admin, button_to_test).click() - alert = get_modal_alert(self.entrance_exam_admin.browser) - alert.dismiss() - - @ddt.data(*admin_buttons) - def test_admin_button_with_error(self, button_to_test): - """ - Scenario: Clicking on the requested button with email address or username - of a non existing student should result in error message. - Given that I am on the Student Admin tab on the Instructor Dashboard - When I click the requested Button under Entrance Exam Grade - Adjustment after non existing student email address or username - Then I should be shown an error message - """ - self.entrance_exam_admin.set_student_email_or_username('non_existing@example.com') - getattr(self.entrance_exam_admin, button_to_test).click() - self.entrance_exam_admin.wait_for_ajax() - self.assertGreater(len(self.entrance_exam_admin.top_notification.text[0]), 0) - - def test_skip_entrance_exam_button_with_success(self): - """ - Scenario: Clicking on the Let Student Skip Entrance Exam button with - valid student email address or username should result in success prompt. - Given that I am on the Student Admin tab on the Instructor Dashboard - When I click the Let Student Skip Entrance Exam Button under - Entrance Exam Grade Adjustment after entering a valid student - email address or username - Then I should be shown an alert with success message - """ - self.entrance_exam_admin.set_student_email_or_username(self.student_identifier) - self.entrance_exam_admin.skip_entrance_exam_button.click() - - #first we have window.confirm - alert = get_modal_alert(self.entrance_exam_admin.browser) - alert.accept() - - # then we have alert confirming action - alert = get_modal_alert(self.entrance_exam_admin.browser) - alert.dismiss() - - def test_skip_entrance_exam_button_with_error(self): - """ - Scenario: Clicking on the Let Student Skip Entrance Exam button with - email address or username of a non existing student should result in error message. - Given that I am on the Student Admin tab on the Instructor Dashboard - When I click the Let Student Skip Entrance Exam Button under - Entrance Exam Grade Adjustment after entering non existing - student email address or username - Then I should be shown an error message - """ - self.entrance_exam_admin.set_student_email_or_username('non_existing@example.com') - self.entrance_exam_admin.skip_entrance_exam_button.click() - - #first we have window.confirm - alert = get_modal_alert(self.entrance_exam_admin.browser) - alert.accept() - - self.entrance_exam_admin.wait_for_ajax() - self.assertGreater(len(self.entrance_exam_admin.top_notification.text[0]), 0) - - def test_task_history_button_with_success(self): - """ - Scenario: Clicking on the Show Background Task History for Student - with valid student email address or username should result in table of tasks. - Given that I am on the Student Admin tab on the Instructor Dashboard - When I click the Show Background Task History for Student Button - under Entrance Exam Grade Adjustment after entering a valid student - email address or username - Then I should be shown a table listing all background tasks - """ - self.entrance_exam_admin.set_student_email_or_username(self.student_identifier) - self.entrance_exam_admin.task_history_button.click() - self.entrance_exam_admin.wait_for_task_history_table() - - @attr(shard=10) class DataDownloadsTest(BaseInstructorDashboardTest): """