コード例 #1
0
ファイル: test_lms_problems.py プロジェクト: fdns/eol-edx
    def test_past_due(self):
        """
        Verifies that the Submit button disables when the max number of attempts is reached.
        """
        self.courseware_page.visit()
        problem_page = ProblemPage(self.browser)
        # Should have Submit button disabled on original rendering.
        problem_page.wait_for_submit_disabled()

        # Select a choice, and make sure that the Submit button remains disabled.
        problem_page.click_choice("choice_2")
        problem_page.wait_for_submit_disabled()
コード例 #2
0
    def test_past_due(self):
        """
        Verifies that the Submit button disables when the max number of attempts is reached.
        """
        self.courseware_page.visit()
        problem_page = ProblemPage(self.browser)
        # Should have Submit button disabled on original rendering.
        problem_page.wait_for_submit_disabled()

        # Select a choice, and make sure that the Submit button remains disabled.
        problem_page.click_choice("choice_2")
        problem_page.wait_for_submit_disabled()
コード例 #3
0
ファイル: test_lms_problems.py プロジェクト: fdns/eol-edx
    def test_max_attempts(self):
        """
        Verifies that the Submit button disables when the max number of attempts is reached.
        """
        self.courseware_page.visit()
        problem_page = ProblemPage(self.browser)

        # Submit first answer (correct)
        problem_page.click_choice("choice_2")
        self.assertFalse(problem_page.is_submit_disabled())
        problem_page.click_submit()
        problem_page.wait_success_notification()

        # Submit second and final answer (incorrect)
        problem_page.click_choice("choice_1")
        problem_page.click_submit()
        problem_page.wait_incorrect_notification()

        # Make sure that the Submit button disables.
        problem_page.wait_for_submit_disabled()
コード例 #4
0
    def test_max_attempts(self):
        """
        Verifies that the Submit button disables when the max number of attempts is reached.
        """
        self.courseware_page.visit()
        problem_page = ProblemPage(self.browser)

        # Submit first answer (correct)
        problem_page.click_choice("choice_2")
        self.assertFalse(problem_page.is_submit_disabled())
        problem_page.click_submit()
        problem_page.wait_success_notification()

        # Submit second and final answer (incorrect)
        problem_page.click_choice("choice_1")
        problem_page.click_submit()
        problem_page.wait_incorrect_notification()

        # Make sure that the Submit button disables.
        problem_page.wait_for_submit_disabled()