예제 #1
0
class FullWorkflowRequiredA11yTest(OpenAssessmentA11yTest, FullWorkflowMixin):
    """
    Test accessibility when both staff override and full staff grading rubrics have rendered.
    """

    def setUp(self):
        super(FullWorkflowRequiredA11yTest, self).setUp('full_workflow_staff_required', staff=True)
        self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc)

    def test_multiple_rubrics(self):
        """
        Test accessibility when both the staff override and the full staff grading
        rubric forms have been opened.
        """
        # Create a learner with submission, training, and self assessment completed.
        learner = self.do_train_self_peer(False)

        # Open up the full staff grading form
        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-grading")
        self.staff_area_page.expand_staff_grading_section()

        # Open up the override form
        self.staff_area_page.show_learner(learner)
        self.staff_area_page.expand_learner_report_sections()

        self._check_a11y(self.staff_area_page)
예제 #2
0
class FullWorkflowRequiredA11yTest(OpenAssessmentA11yTest, FullWorkflowMixin):
    """
    Test accessibility when both staff override and full staff grading rubrics have rendered.
    """

    def setUp(self):
        super(FullWorkflowRequiredA11yTest, self).setUp('full_workflow_staff_required', staff=True)
        self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc)

    def test_multiple_rubrics(self):
        """
        Test accessibility when both the staff override and the full staff grading
        rubric forms have been opened.
        """
        # Create a learner with submission, training, and self assessment completed.
        learner = self.do_train_self_peer(False)

        # Open up the full staff grading form
        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-grading")
        self.staff_area_page.expand_staff_grading_section()

        # Open up the override form
        self.staff_area_page.show_learner(learner)
        self.staff_area_page.expand_learner_report_sections()

        self._check_a11y(self.staff_area_page)
예제 #3
0
class StaffAreaA11yTest(OpenAssessmentA11yTest):
    """
    Test the accessibility of the staff area.

    This is testing a problem with "staff assessment only".
    """
    def setUp(self):
        super(StaffAreaA11yTest, self).setUp('staff_only', staff=True)
        self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc)

    def test_staff_tools_panel(self):
        """
        Check the accessibility of the "Staff Tools" panel
        """
        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-tools")
        self._check_a11y(self.staff_area_page)

    def test_staff_info_panel(self):
        """
        Check the accessibility of the "Staff Info" panel
        """
        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-info")
        self._check_a11y(self.staff_area_page)

    def test_staff_grading_panel(self):
        """
        Check the accessibility of the "Staff Grading" panel
        """
        self.submission_page.visit().submit_response(self.SUBMISSION)
        self.assertTrue(self.submission_page.has_submitted)

        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-grading")
        self.staff_area_page.expand_staff_grading_section()
        self._check_a11y(self.staff_area_page)

    def test_learner_info(self):
        """
        Check the accessibility of the learner information sections of the "Staff Tools" panel.
        """
        self.auto_auth_page.visit()
        username, _ = self.auto_auth_page.get_username_and_email()

        self.submission_page.visit().submit_response(self.SUBMISSION)
        self.assertTrue(self.submission_page.has_submitted)

        self.staff_area_page.visit()

        # Click on staff tools and search for the user.
        self.staff_area_page.show_learner(username)
        self.staff_area_page.expand_learner_report_sections()

        self._check_a11y(self.staff_area_page)

    def test_staff_grade(self):
        """
        Check the accessibility of the Staff Grade section, as shown to the learner.
        """
        self.submission_page.visit().submit_response(self.SUBMISSION)
        self.assertTrue(self.submission_page.has_submitted)

        self.do_staff_assessment(options_selected=self.STAFF_OVERRIDE_OPTIONS_SELECTED)

        # Refresh the page, then verify accessibility of the Staff Grade section (marked Complete).
        self.browser.refresh()
        self._verify_staff_grade_section(self.STAFF_GRADE_EXISTS, None)

        self._check_a11y(self.staff_asmnt_page)
예제 #4
0
class StaffAreaA11yTest(OpenAssessmentA11yTest):
    """
    Test the accessibility of the staff area.

    This is testing a problem with "staff assessment only".
    """
    def setUp(self):
        super(StaffAreaA11yTest, self).setUp('staff_only', staff=True)
        self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc)

    def test_staff_tools_panel(self):
        """
        Check the accessibility of the "Staff Tools" panel
        """
        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-tools")
        self._check_a11y(self.staff_area_page)

    def test_staff_info_panel(self):
        """
        Check the accessibility of the "Staff Info" panel
        """
        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-info")
        self._check_a11y(self.staff_area_page)

    def test_staff_grading_panel(self):
        """
        Check the accessibility of the "Staff Grading" panel
        """
        self.submission_page.visit().submit_response(self.SUBMISSION)
        self.assertTrue(self.submission_page.has_submitted)

        self.staff_area_page.visit()
        self.staff_area_page.click_staff_toolbar_button("staff-grading")
        self.staff_area_page.expand_staff_grading_section()
        self._check_a11y(self.staff_area_page)

    def test_learner_info(self):
        """
        Check the accessibility of the learner information sections of the "Staff Tools" panel.
        """
        self.auto_auth_page.visit()
        username, _ = self.auto_auth_page.get_username_and_email()

        self.submission_page.visit().submit_response(self.SUBMISSION)
        self.assertTrue(self.submission_page.has_submitted)

        self.staff_area_page.visit()

        # Click on staff tools and search for the user.
        self.staff_area_page.show_learner(username)
        self.staff_area_page.expand_learner_report_sections()

        self._check_a11y(self.staff_area_page)

    def test_staff_grade(self):
        """
        Check the accessibility of the Staff Grade section, as shown to the learner.
        """
        self.submission_page.visit().submit_response(self.SUBMISSION)
        self.assertTrue(self.submission_page.has_submitted)

        self.do_staff_assessment(options_selected=self.STAFF_OVERRIDE_OPTIONS_SELECTED)

        # Refresh the page, then verify accessibility of the Staff Grade section (marked Complete).
        self.browser.refresh()
        self._verify_staff_grade_section(self.STAFF_GRADE_EXISTS)

        self._check_a11y(self.staff_asmnt_page)