diff --git a/mod/quiz/tests/behat/completion_condition_attempts_used.feature b/mod/quiz/tests/behat/completion_condition_attempts_used.feature index 63e3b611b27..f79805fd5e3 100644 --- a/mod/quiz/tests/behat/completion_condition_attempts_used.feature +++ b/mod/quiz/tests/behat/completion_condition_attempts_used.feature @@ -34,7 +34,7 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all | slot | response | | 1 | False | - Scenario: student1 uses up both attempts without passing + Scenario Outline: Student attempts the quiz - pass and fails When I log in as "student1" And I am on "Course 1" course homepage And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done" @@ -42,16 +42,16 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo" And I follow "Test quiz name" And I press "Re-attempt quiz" - And I set the field "False" to "1" + And I set the field "" to "1" And I press "Finish attempt ..." And I press "Submit all and finish" And I am on "Course 1" course homepage Then the "Receive a grade" completion condition of "Test quiz name" is displayed as "done" - And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed" + And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "" And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done" And I follow "Test quiz name" And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done" - And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed" + And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "" And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done" And I log out And I log in as "teacher1" @@ -60,4 +60,9 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all And "Test quiz name" should have the "Receive a pass grade or complete all available attempts" completion condition And I am on "Course 1" course homepage And I navigate to "Reports > Activity completion" in current page administration - And "Completed" "icon" should exist in the "Student 1" "table_row" + And "" "icon" should exist in the "Student 1" "table_row" + + Examples: + | answer | passcompletionexpected | expectedactivitycompletion | + | False | failed | Completed (did not achieve pass grade) | + | True | done | Completed (achieved pass grade) | diff --git a/mod/quiz/tests/behat/quiz_activity_completion.feature b/mod/quiz/tests/behat/quiz_activity_completion.feature index 63dc6ac21f1..dc4212fbf9b 100644 --- a/mod/quiz/tests/behat/quiz_activity_completion.feature +++ b/mod/quiz/tests/behat/quiz_activity_completion.feature @@ -43,7 +43,7 @@ Feature: View activity completion in the quiz activity | question | page | | First question | 1 | - Scenario: View automatic completion items as a student + Scenario Outline: View automatic completion items as a student When I log in as "student1" And I am on "Course 1" course homepage And I follow "Test quiz name" @@ -63,12 +63,23 @@ Feature: View activity completion in the quiz activity And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed" And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo" And I press "Re-attempt quiz" - And I set the field "True" to "1" + And I set the field "" to "1" And I press "Finish attempt ..." And I press "Submit all and finish" And I follow "Finish review" And the "View" completion condition of "Test quiz name" is displayed as "done" And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "done" And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done" - And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "done" + And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "" And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done" + And I log out + And I log in as "teacher1" + And I am on "Course 1" course homepage + And I navigate to "Reports > Activity completion" in current page administration + And I pause + And "" "icon" should exist in the "Student 1" "table_row" + + Examples: + | answer | passcompletionexpected | expectedactivitycompletion | + | False | failed | Completed (did not achieve pass grade) | + | True | done | Completed (achieved pass grade) |