diff --git a/tests/behat/allocation_automatic_allocations_disabled.feature b/tests/behat/allocation_automatic_allocations_disabled.feature index 034f2cb9..8536bf9e 100644 --- a/tests/behat/allocation_automatic_allocations_disabled.feature +++ b/tests/behat/allocation_automatic_allocations_disabled.feature @@ -5,17 +5,17 @@ Feature: Automatic allocations can be disabled I want to be able to turn off automatic allocations So that I can choose the teachers manually and not have weird or inappropriate allocations - Background: - Given the managers are not allowed to grade - And there is a course - And there is a coursework - And there is a teacher - And I am logged in as a manager - And the managers are not allowed to grade - And there are no allocations in the db + Background: + Given the managers are not allowed to grade + And there is a course + And there is a coursework + And there is a teacher + And I am logged in as a manager + And the managers are not allowed to grade + And there are no allocations in the db - Scenario: Nothing happens with - Given the coursework "allocationenabled" setting is "1" in the database - And the coursework "assessorallocationstrategy" setting is "none" in the database - When there is a student - Then there should be no allocations in the db + Scenario: Nothing happens with + Given the coursework "allocationenabled" setting is "1" in the database + And the coursework "assessorallocationstrategy" setting is "none" in the database + When there is a student + Then there should be no allocations in the db diff --git a/tests/behat/allocation_automatic_equal_assessor_allocations.feature b/tests/behat/allocation_automatic_equal_assessor_allocations.feature index 7a3a8461..7dc68dc8 100644 --- a/tests/behat/allocation_automatic_equal_assessor_allocations.feature +++ b/tests/behat/allocation_automatic_equal_assessor_allocations.feature @@ -6,35 +6,30 @@ Feature: Automatic equal assessor allocations So that the marking is fairly distributed and the interface is less cluttered for teachers, and they don't mark to many or too few. - Background: - Given the managers are not allowed to grade - And there is a course - And there is a coursework - And the coursework "allocationenabled" setting is "1" in the database - And the coursework "numberofmarkers" setting is "1" in the database - And there is a student - And there is a teacher - And teachers hava a capability to administer grades - And I am logged in as a manager - And there are no allocations in the db - - Scenario: Automatic allocations should work - When I visit the allocations page - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should see the student's name on the page - - Scenario: Automatic allocations of non-manually allocated should work - When I visit the allocations page - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should see the student's name on the page - - - - - + Background: + Given the managers are not allowed to grade + And there is a course + And there is a coursework + And the coursework "allocationenabled" setting is "1" in the database + And the coursework "numberofmarkers" setting is "1" in the database + And there is a student + And there is a teacher + And teachers hava a capability to administer grades + And I am logged in as a manager + And there are no allocations in the db + + Scenario: Automatic allocations should work + When I visit the allocations page + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should see the student's name on the page + + Scenario: Automatic allocations of non-manually allocated should work + When I visit the allocations page + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should see the student's name on the page diff --git a/tests/behat/allocation_automatic_interacting_with_manual_allocations.feature b/tests/behat/allocation_automatic_interacting_with_manual_allocations.feature index 2e976845..2516b80a 100644 --- a/tests/behat/allocation_automatic_interacting_with_manual_allocations.feature +++ b/tests/behat/allocation_automatic_interacting_with_manual_allocations.feature @@ -5,33 +5,32 @@ Feature: Automatically allocations interacting with manually allocated students I want to be able to reallocate all of the non manual students So that if the number of students or teachers has changed, I can make sure everything remains balanced - Background: - Given there is a course - And there is a coursework - And the coursework "allocationenabled" setting is "1" in the database - And the coursework "numberofmarkers" setting is "1" in the database - And the managers are not allowed to grade - And there is a student - And there is a teacher - And I am logged in as a manager + Background: + Given there is a course + And there is a coursework + And the coursework "allocationenabled" setting is "1" in the database + And the coursework "numberofmarkers" setting is "1" in the database + And the managers are not allowed to grade + And there is a student + And there is a teacher + And I am logged in as a manager - Scenario: Automatic allocations should not alter the manual allocations - Given there is another teacher - And there are no allocations in the db - When I visit the allocations page - And I manually allocate the student to the teacher - And I set the allocation strategy to 100 percent for the other teacher - And I save everything - When I visit the allocations page - Then I should see the student allocated to the teacher for the first assessor - - @javascript - Scenario: Automatic allocations should wipe the older automatic allocations - Given the student is allocated to the teacher - And there is another teacher - When I visit the allocations page - And I set the allocation strategy to 100 percent for the other teacher - And I press "Apply" - When I visit the allocations page - Then I should see the student allocated to the other teacher for the first assessor + Scenario: Automatic allocations should not alter the manual allocations + Given there is another teacher + And there are no allocations in the db + When I visit the allocations page + And I manually allocate the student to the teacher + And I set the allocation strategy to 100 percent for the other teacher + And I save everything + When I visit the allocations page + Then I should see the student allocated to the teacher for the first assessor + @javascript + Scenario: Automatic allocations should wipe the older automatic allocations + Given the student is allocated to the teacher + And there is another teacher + When I visit the allocations page + And I set the allocation strategy to 100 percent for the other teacher + And I press "Apply" + When I visit the allocations page + Then I should see the student allocated to the other teacher for the first assessor diff --git a/tests/behat/allocation_automatic_percentage_assessor_allocations.feature b/tests/behat/allocation_automatic_percentage_assessor_allocations.feature index a470fe8d..06a13fe8 100644 --- a/tests/behat/allocation_automatic_percentage_assessor_allocations.feature +++ b/tests/behat/allocation_automatic_percentage_assessor_allocations.feature @@ -6,38 +6,34 @@ Feature: Automatic percentage assessor allocations So that the marking is fairly distributed and the interface is less cluttered for teachers, and they don't mark to many or too few. - Background: - Given there is a course - And there is a coursework - And the coursework "allocationenabled" setting is "1" in the database - And the coursework "numberofmarkers" setting is "1" in the database - And the managers are not allowed to grade - And there is a student - And there is a teacher - And I am logged in as a manager - And there are no allocations in the db - - @javascript - Scenario: Automatic percentage allocations should allocate to the right teacher - Given there is another teacher - And there are no allocations in the db - When I visit the allocations page - And I set the allocation strategy to 100 percent for the other teacher - And I press "Apply" - When I visit the allocations page - Then I should see the student allocated to the other teacher for the first assessor - - Scenario: percentage allocations should not allocate to the wrong teacher - Given there is another teacher - And there are no allocations in the db - When I visit the allocations page - And I set the allocation strategy to 100 percent for the other teacher - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should not see the student's name on the page - - - - + Background: + Given there is a course + And there is a coursework + And the coursework "allocationenabled" setting is "1" in the database + And the coursework "numberofmarkers" setting is "1" in the database + And the managers are not allowed to grade + And there is a student + And there is a teacher + And I am logged in as a manager + And there are no allocations in the db + + @javascript + Scenario: Automatic percentage allocations should allocate to the right teacher + Given there is another teacher + And there are no allocations in the db + When I visit the allocations page + And I set the allocation strategy to 100 percent for the other teacher + And I press "Apply" + When I visit the allocations page + Then I should see the student allocated to the other teacher for the first assessor + + Scenario: percentage allocations should not allocate to the wrong teacher + Given there is another teacher + And there are no allocations in the db + When I visit the allocations page + And I set the allocation strategy to 100 percent for the other teacher + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should not see the student's name on the page diff --git a/tests/behat/allocation_manual_assessor_allocations.feature b/tests/behat/allocation_manual_assessor_allocations.feature index 250814ef..13acf308 100644 --- a/tests/behat/allocation_manual_assessor_allocations.feature +++ b/tests/behat/allocation_manual_assessor_allocations.feature @@ -5,51 +5,51 @@ Feature: Manually assessor allocations As a course leader I want to be able to manually allocate students to assessors - Background: - Given there is a course - And there is a coursework - And the coursework "allocationenabled" setting is "1" in the database - And the coursework "assessorallocationstrategy" setting is "none" in the database - And the coursework "numberofmarkers" setting is "2" in the database - And there is a student - And there is a teacher - And I am logged in as a manager + Background: + Given there is a course + And there is a coursework + And the coursework "allocationenabled" setting is "1" in the database + And the coursework "assessorallocationstrategy" setting is "none" in the database + And the coursework "numberofmarkers" setting is "2" in the database + And there is a student + And there is a teacher + And I am logged in as a manager - Scenario: Teachers do not see students who are allocated to other teachers - Given there is another teacher - And there are no allocations in the db - When I visit the allocations page - And I manually allocate the student to the other teacher - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should not see the student's name on the page + Scenario: Teachers do not see students who are allocated to other teachers + Given there is another teacher + And there are no allocations in the db + When I visit the allocations page + And I manually allocate the student to the other teacher + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should not see the student's name on the page - Scenario: auto allocations should not alter the manual allocations - Given there is another teacher - And there are no allocations in the db - When I visit the allocations page - And I manually allocate the student to the teacher - And I set the allocation strategy to 100 percent for the other teacher - And I save everything - And I visit the allocations page - Then I should see the student allocated to the teacher for the first assessor + Scenario: auto allocations should not alter the manual allocations + Given there is another teacher + And there are no allocations in the db + When I visit the allocations page + And I manually allocate the student to the teacher + And I set the allocation strategy to 100 percent for the other teacher + And I save everything + And I visit the allocations page + Then I should see the student allocated to the teacher for the first assessor - Scenario: allocating multiple teachers - Given there is another teacher - When I visit the allocations page - And I manually allocate the student to the teacher - And I save everything - And I visit the allocations page - And I manually allocate the student to the other teacher for the second assessment - And I save everything - And I visit the allocations page - Then I should see that the student has two allcations + Scenario: allocating multiple teachers + Given there is another teacher + When I visit the allocations page + And I manually allocate the student to the teacher + And I save everything + And I visit the allocations page + And I manually allocate the student to the other teacher for the second assessment + And I save everything + And I visit the allocations page + Then I should see that the student has two allcations - Scenario: Allocations work for more than one student - Given there is another student - When I visit the allocations page - And I manually allocate the student to the teacher - And I manually allocate the other student to the teacher - And I save everything - Then I should see that both students are allocated to the teacher + Scenario: Allocations work for more than one student + Given there is another student + When I visit the allocations page + And I manually allocate the student to the teacher + And I manually allocate the other student to the teacher + And I save everything + Then I should see that both students are allocated to the teacher diff --git a/tests/behat/allocation_visibility_of_all_students_capability.feature b/tests/behat/allocation_visibility_of_all_students_capability.feature index 15551950..cc5d6444 100644 --- a/tests/behat/allocation_visibility_of_all_students_capability.feature +++ b/tests/behat/allocation_visibility_of_all_students_capability.feature @@ -38,11 +38,3 @@ Feature: View of all students: allocated and non allocated students And I visit the coursework page And I click show all students button Then I should see another student's name on the page - - - - - - - - diff --git a/tests/behat/allocation_visibility_of_allocated_students.feature b/tests/behat/allocation_visibility_of_allocated_students.feature index dc4481d1..a47afbe6 100644 --- a/tests/behat/allocation_visibility_of_allocated_students.feature +++ b/tests/behat/allocation_visibility_of_allocated_students.feature @@ -5,25 +5,25 @@ Feature: Visibility of allocated students As a course leader I want teachers to only see the students who have been allocated to them - Background: - Given there is a course - And there is a coursework - And the coursework "allocationenabled" setting is "1" in the database - And the coursework "assessorallocationstrategy" setting is "none" in the database - And there is a student - And there is a teacher + Background: + Given there is a course + And there is a coursework + And the coursework "allocationenabled" setting is "1" in the database + And the coursework "assessorallocationstrategy" setting is "none" in the database + And there is a student + And there is a teacher - Scenario: Teachers do not see students who are unallocated - Given I log in as the teacher - And I visit the coursework page - Then I should not see the student's name on the page + Scenario: Teachers do not see students who are unallocated + Given I log in as the teacher + And I visit the coursework page + Then I should not see the student's name on the page - Scenario: I can allocate a student manually and the teacher will see them - Given I am logged in as a manager - When I visit the allocations page - And I manually allocate the student to the teacher - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should see the student's name on the page \ No newline at end of file + Scenario: I can allocate a student manually and the teacher will see them + Given I am logged in as a manager + When I visit the allocations page + And I manually allocate the student to the teacher + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should see the student's name on the page diff --git a/tests/behat/allocation_visibility_of_allocated_teachers.feature b/tests/behat/allocation_visibility_of_allocated_teachers.feature index 6ac591d8..832fba3a 100644 --- a/tests/behat/allocation_visibility_of_allocated_teachers.feature +++ b/tests/behat/allocation_visibility_of_allocated_teachers.feature @@ -5,16 +5,16 @@ Feature: Visibility of allocated teachers I want to know who is allocated to mark each submission So that I do not accidentally mark the wrong stuff - Background: - Given there is a course - And there is a coursework - And there is a student + Background: + Given there is a course + And there is a coursework + And there is a student - Scenario: I should see the name of the allocated teacher in the assessor feedback cell - Given there is a teacher - And the coursework is set to single marker - And the coursework has assessor allocations enabled - And the student is manually allocated to the teacher - When I log in as a manager - And I visit the coursework page - Then I should see the name of the teacher in the assessor feedback cell + Scenario: I should see the name of the allocated teacher in the assessor feedback cell + Given there is a teacher + And the coursework is set to single marker + And the coursework has assessor allocations enabled + And the student is manually allocated to the teacher + When I log in as a manager + And I visit the coursework page + Then I should see the name of the teacher in the assessor feedback cell diff --git a/tests/behat/automatic_agreement.feature b/tests/behat/automatic_agreement.feature index c33b0c71..5ecae93e 100644 --- a/tests/behat/automatic_agreement.feature +++ b/tests/behat/automatic_agreement.feature @@ -5,48 +5,35 @@ Feature: Automatic agreement for simple grades I can add an automatic agreement for double marking when both simple grades are adjacent within a specified range, so that the highest grade is chosen for all cases apart from the fail grades. - Background: - Given there is a course - And there is a coursework - And the coursework "numberofmarkers" setting is "2" in the database - And there is a teacher - And there is another teacher - And there is a student - And the student has a submission - And the submission is finalised - And the coursework deadline has passed - - Scenario: Only one grade in the submissions - And the coursework "automaticagreementstrategy" setting is "none" in the database - Given I am logged in as a teacher - And I visit the coursework page - And I click on the new feedback button for assessor 1 - When I grade the submission as 56 using the simple form - Then I should not see the final grade on the multiple marker page - - Scenario: Simple grades within 10% boundaries takes higher mark as a final grade - Given the coursework "automaticagreementstrategy" setting is "percentage_distance" in the database - Given the coursework "automaticagreementrange" setting is "10" in the database - And I am logged in as a teacher - And I visit the coursework page - And I click on the new feedback button for assessor 1 - And I grade the submission as 67 using the simple form - And I log out - And I log in as the other teacher - And I visit the coursework page - And I click on the new feedback button for assessor 2 - And I grade the submission as 63 using the simple form - Then I should see the final grade as 67 on the multiple marker page - - - - - - - - - - - - - + Background: + Given there is a course + And there is a coursework + And the coursework "numberofmarkers" setting is "2" in the database + And there is a teacher + And there is another teacher + And there is a student + And the student has a submission + And the submission is finalised + And the coursework deadline has passed + + Scenario: Only one grade in the submissions + And the coursework "automaticagreementstrategy" setting is "none" in the database + Given I am logged in as a teacher + And I visit the coursework page + And I click on the new feedback button for assessor 1 + When I grade the submission as 56 using the simple form + Then I should not see the final grade on the multiple marker page + + Scenario: Simple grades within 10% boundaries takes higher mark as a final grade + Given the coursework "automaticagreementstrategy" setting is "percentage_distance" in the database + Given the coursework "automaticagreementrange" setting is "10" in the database + And I am logged in as a teacher + And I visit the coursework page + And I click on the new feedback button for assessor 1 + And I grade the submission as 67 using the simple form + And I log out + And I log in as the other teacher + And I visit the coursework page + And I click on the new feedback button for assessor 2 + And I grade the submission as 63 using the simple form + Then I should see the final grade as 67 on the multiple marker page diff --git a/tests/behat/blind_marking_visibiilty_for_agreed_graders_with_blind_marking.feature b/tests/behat/blind_marking_visibiilty_for_agreed_graders_with_blind_marking.feature index 3107d88c..c34228ee 100644 --- a/tests/behat/blind_marking_visibiilty_for_agreed_graders_with_blind_marking.feature +++ b/tests/behat/blind_marking_visibiilty_for_agreed_graders_with_blind_marking.feature @@ -6,28 +6,27 @@ Feature: visibility of agreed graders with blind marking teachers before the agreement phase So that we are not influenced by one another or confused over what to do - Background: - Given there is a course - And there is a coursework - And blind marking is enabled - And teachers have the add agreed grade capability - And there is a teacher - And there is another teacher - And the coursework "numberofmarkers" setting is "2" in the database - And there is a student - And the student has a submission - And the submission is finalised + Background: + Given there is a course + And there is a coursework + And blind marking is enabled + And teachers have the add agreed grade capability + And there is a teacher + And there is another teacher + And the coursework "numberofmarkers" setting is "2" in the database + And there is a student + And the student has a submission + And the submission is finalised - Scenario: agreed graders cannot see other feedbacks before they have done their own - Given I am logged in as the other teacher - And there is feedback for the submission from the teacher - When I visit the coursework page - Then I should not see the grade from the teacher in the assessor table - - Scenario: agreed graders can view the feedback of the other assessors when all done - Given there are feedbacks from both teachers - And I am logged in as the other teacher - And I visit the coursework page - When I click on the view icon for the first initial assessor's grade - Then I should see the first initial assessors grade and comment + Scenario: agreed graders cannot see other feedbacks before they have done their own + Given I am logged in as the other teacher + And there is feedback for the submission from the teacher + When I visit the coursework page + Then I should not see the grade from the teacher in the assessor table + Scenario: agreed graders can view the feedback of the other assessors when all done + Given there are feedbacks from both teachers + And I am logged in as the other teacher + And I visit the coursework page + When I click on the view icon for the first initial assessor's grade + Then I should see the first initial assessors grade and comment diff --git a/tests/behat/blind_marking_visibiilty_for_agreed_graders_without_blind_marking.feature b/tests/behat/blind_marking_visibiilty_for_agreed_graders_without_blind_marking.feature index 3b0606d8..6a02ce43 100644 --- a/tests/behat/blind_marking_visibiilty_for_agreed_graders_without_blind_marking.feature +++ b/tests/behat/blind_marking_visibiilty_for_agreed_graders_without_blind_marking.feature @@ -6,28 +6,28 @@ Feature: visibility of agreed graders without blind marking teachers before the agreement phase So that we are not influenced by one another or confused over what to do - Background: - Given there is a course - And there is a coursework - And there is a teacher - And there is another teacher - And the coursework "numberofmarkers" setting is "2" in the database - And there is a student - And the student has a submission - And the submission is finalised + Background: + Given there is a course + And there is a coursework + And there is a teacher + And there is another teacher + And the coursework "numberofmarkers" setting is "2" in the database + And there is a student + And the student has a submission + And the submission is finalised - Scenario: agreed graders can see other feedbacks before they have done their own - Given teachers have the add agreed grade capability - And the coursework "viewinitialgradeenabled" setting is "1" in the database - And I am logged in as the other teacher - And there is feedback for the submission from the teacher - When I visit the coursework page - Then I should see the grade from the teacher in the assessor table + Scenario: agreed graders can see other feedbacks before they have done their own + Given teachers have the add agreed grade capability + And the coursework "viewinitialgradeenabled" setting is "1" in the database + And I am logged in as the other teacher + And there is feedback for the submission from the teacher + When I visit the coursework page + Then I should see the grade from the teacher in the assessor table - Scenario: agreed graders can view the feedback of the other assessors when all done - Given there are feedbacks from both teachers - And teachers have the add agreed grade capability - And I am logged in as the other teacher - And I visit the coursework page - When I click on the view icon for the first initial assessor's grade - Then I should see the first initial assessors grade and comment \ No newline at end of file + Scenario: agreed graders can view the feedback of the other assessors when all done + Given there are feedbacks from both teachers + And teachers have the add agreed grade capability + And I am logged in as the other teacher + And I visit the coursework page + When I click on the view icon for the first initial assessor's grade + Then I should see the first initial assessors grade and comment diff --git a/tests/behat/blind_marking_visibility_for_teachers_with_blind_marking.feature b/tests/behat/blind_marking_visibility_for_teachers_with_blind_marking.feature index 2577ebc2..46a036e0 100644 --- a/tests/behat/blind_marking_visibility_for_teachers_with_blind_marking.feature +++ b/tests/behat/blind_marking_visibility_for_teachers_with_blind_marking.feature @@ -5,37 +5,34 @@ Feature: Visibility for teachers with blind marking I want to be able to prevent teachers from seeing each others' marks So that I can be sure that they are not influenced by each other and the marking is fair - Background: - Given there is a course - And there is a coursework - And blind marking is enabled - - Scenario: The student names are hidden from teachers in the user cells - Given I am logged in as a teacher - And there is a student - When I visit the coursework page - Then I should not see the student's name in the user cell - - Scenario: The user names are hidden from teachers in the group cells - Given I am logged in as a teacher - And there is a student - And group submissions are enabled - And the student is a member of a group - And the group is part of a grouping for the coursework - When I visit the coursework page - Then I should not see the student's name in the group cell - - Scenario: Teachers cannot see other initial grades before final grading happens - Given the coursework "numberofmarkers" setting is "2" in the database - And there is a teacher - And there is another teacher - And there is a student - And the student has a submission - And the submission is finalised - And there are feedbacks from both teachers - And I am logged in as the other teacher - When I visit the coursework page - Then I should not see the grade from the teacher in the assessor table - - - + Background: + Given there is a course + And there is a coursework + And blind marking is enabled + + Scenario: The student names are hidden from teachers in the user cells + Given I am logged in as a teacher + And there is a student + When I visit the coursework page + Then I should not see the student's name in the user cell + + Scenario: The user names are hidden from teachers in the group cells + Given I am logged in as a teacher + And there is a student + And group submissions are enabled + And the student is a member of a group + And the group is part of a grouping for the coursework + When I visit the coursework page + Then I should not see the student's name in the group cell + + Scenario: Teachers cannot see other initial grades before final grading happens + Given the coursework "numberofmarkers" setting is "2" in the database + And there is a teacher + And there is another teacher + And there is a student + And the student has a submission + And the submission is finalised + And there are feedbacks from both teachers + And I am logged in as the other teacher + When I visit the coursework page + Then I should not see the grade from the teacher in the assessor table diff --git a/tests/behat/blind_marking_visibility_for_teachers_without_blind_marking.feature b/tests/behat/blind_marking_visibility_for_teachers_without_blind_marking.feature index b5f94c43..b3fdc266 100644 --- a/tests/behat/blind_marking_visibility_for_teachers_without_blind_marking.feature +++ b/tests/behat/blind_marking_visibility_for_teachers_without_blind_marking.feature @@ -5,35 +5,34 @@ Feature: visibility for teachers without blind marking I want to be able to prevent teachers from seeing each others' marks So that I can be sure that they are not influenced by each other and the marking is fair - Background: - Given there is a course - And there is a coursework + Background: + Given there is a course + And there is a coursework - Scenario: The student names are normally visible to teachers in the user cells - Given I am logged in as a teacher - And there is a student - When I visit the coursework page - Then I should see the student's name in the user cell + Scenario: The student names are normally visible to teachers in the user cells + Given I am logged in as a teacher + And there is a student + When I visit the coursework page + Then I should see the student's name in the user cell Scenario: The user names are visible from teachers in the group cells - Given I am logged in as a teacher - And there is a student - And group submissions are enabled - And the student is a member of a group - And the group is part of a grouping for the coursework - When I visit the coursework page - Then I should see the student's name in the group cell - - Scenario: Teachers can see other grades - Given the coursework "numberofmarkers" setting is "2" in the database - And the coursework "viewinitialgradeenabled" setting is "1" in the database - And there is a teacher - And there is another teacher - And there is a student - And the student has a submission - And the submission is finalised - And there are feedbacks from both teachers - And I am logged in as the other teacher - When I visit the coursework page - Then I should see the grade from the teacher in the assessor table + Given I am logged in as a teacher + And there is a student + And group submissions are enabled + And the student is a member of a group + And the group is part of a grouping for the coursework + When I visit the coursework page + Then I should see the student's name in the group cell + Scenario: Teachers can see other grades + Given the coursework "numberofmarkers" setting is "2" in the database + And the coursework "viewinitialgradeenabled" setting is "1" in the database + And there is a teacher + And there is another teacher + And there is a student + And the student has a submission + And the submission is finalised + And there are feedbacks from both teachers + And I am logged in as the other teacher + When I visit the coursework page + Then I should see the grade from the teacher in the assessor table diff --git a/tests/behat/deadline_extension.feature b/tests/behat/deadline_extension.feature index 7f30c8b0..e35c0a0a 100644 --- a/tests/behat/deadline_extension.feature +++ b/tests/behat/deadline_extension.feature @@ -28,7 +28,7 @@ Feature: Deadlines extensions for submissions Scenario: The teacher can add a deadline extension to an individual submission Given the coursework deadline has passed And I log in as a manager - And I am on the coursework page + And I visit the coursework page When I add a new extension for the student Then I should be on the coursework page And I should see the extended deadline in the student row @@ -37,7 +37,7 @@ Feature: Deadlines extensions for submissions Given the coursework deadline has passed And there is an extension for the student which has expired And I log in as a manager - And I am on the coursework page + And I visit the coursework page When I edit the extension for the student Then I should be on the coursework page And I should see the extended deadline in the student row diff --git a/tests/behat/deadline_extension_reason_dropdown_list.feature b/tests/behat/deadline_extension_reason_dropdown_list.feature index 50db3908..84987d2f 100644 --- a/tests/behat/deadline_extension_reason_dropdown_list.feature +++ b/tests/behat/deadline_extension_reason_dropdown_list.feature @@ -15,7 +15,7 @@ Feature: Deadline extension reasons dropdown list Given the coursework deadline has passed And there are some extension reasons configured at site level And I log in as a manager - And I am on the coursework page + And I visit the coursework page When I add a new extension for the student Then I should be on the coursework page When I click on the edit extension icon for the student @@ -27,11 +27,10 @@ Feature: Deadline extension reasons dropdown list And there are some extension reasons configured at site level And there is an extension for the student which has expired And I log in as a manager - And I am on the coursework page + And I visit the coursework page When I edit the extension for the student Then I should be on the coursework page And I should see the new extended deadline in the student row When I click on the edit extension icon for the student Then I should see the new deadline reason in the dropdown And I should see the new extra deadline information in the deadline extension form - diff --git a/tests/behat/enrolment_triggers.feature b/tests/behat/enrolment_triggers.feature index 1a61d77d..3799958b 100644 --- a/tests/behat/enrolment_triggers.feature +++ b/tests/behat/enrolment_triggers.feature @@ -5,31 +5,30 @@ Feature: the students should be auto allocated on enrolment I want the students to be reallocated when they or their assessors are added or removed from the course So that they always have a configured allocation for an appropriate assessor - Background: - Given there is a course - And there is a coursework - And there is a teacher - And the coursework "allocationenabled" setting is "1" in the database - And there are no allocations in the db - - Scenario: new students should be allocated when they join + Background: + Given there is a course + And there is a coursework + And there is a teacher + And the coursework "allocationenabled" setting is "1" in the database + And there are no allocations in the db + + Scenario: new students should be allocated when they join pending - Scenario: exisitng manual allocations should not be reallocated when a tutor joins + Scenario: exisitng manual allocations should not be reallocated when a tutor joins pending - Scenario: existing auto allocations should not be reallocated when a tutor joins + Scenario: existing auto allocations should not be reallocated when a tutor joins pending - Scenario: exisitng graded allocations should not be reallocated when a tutor joins + Scenario: exisitng graded allocations should not be reallocated when a tutor joins pending - Scenario: exisitng manual allocations should not be reallocated when a tutor leaves + Scenario: exisitng manual allocations should not be reallocated when a tutor leaves pending - Scenario: existing auto allocations should not be reallocated when a tutor leaves + Scenario: existing auto allocations should not be reallocated when a tutor leaves pending - Scenario: exisitng graded allocations should not be reallocated when a tutor leaves + Scenario: exisitng graded allocations should not be reallocated when a tutor leaves pending - diff --git a/tests/behat/factory.feature b/tests/behat/factory.feature index 8c8f9356..cb5b314e 100644 --- a/tests/behat/factory.feature +++ b/tests/behat/factory.feature @@ -5,83 +5,80 @@ Feature: Testing that the factories for behat steps work. If any tests fail, fix I want to be able to use a factory to generate the scenario context So that my tests are easier to write and run faster - @javascript - Scenario: Making a coursework - Given there is a course - And I am logged in as a teacher - And there is a coursework - When I visit the coursework page - Then I should see the title of the coursework on the page + @javascript + Scenario: Making a coursework + Given there is a course + And I am logged in as a teacher + And there is a coursework + When I visit the coursework page + Then I should see the title of the coursework on the page - Scenario: the submission factory works properly and shows the file on the page - Given there is a course - And there is a coursework - And I am logged in as a student - And I have a submission - When I visit the coursework page - Then I should see the file on the page + Scenario: the submission factory works properly and shows the file on the page + Given there is a course + And there is a coursework + And I am logged in as a student + And I have a submission + When I visit the coursework page + Then I should see the file on the page - @javascript - Scenario: the submission factory works properly and shows the file in the upload area - Given there is a course - And there is a coursework - And I am logged in as a student - And I have a submission - When I visit the coursework page - And I click on the edit submission button - Then I should see "1" elements in "Upload a file" filemanager + @javascript + Scenario: the submission factory works properly and shows the file in the upload area + Given there is a course + And there is a coursework + And I am logged in as a student + And I have a submission + When I visit the coursework page + And I click on the edit submission button + Then I should see "1" elements in "Upload a file" filemanager - Scenario: Making a coursework sets the defaults correctly - Given there is a course - And I am logged in as an editing teacher - When I visit the course page - And I turn editing mode on - When I add a "Coursework" to section "3" and I fill the form with: + Scenario: Making a coursework sets the defaults correctly + Given there is a course + And I am logged in as an editing teacher + When I visit the course page + And I turn editing mode on + When I add a "coursework" activity to course "C1" section "3" and I fill the form with: | name | Test coursework | | Description | Test coursework description | - Then the coursework general feedback should be disabled + Then the coursework general feedback should be disabled - Scenario: The coursework settings can be changed - Given there is a course - And I am logged in as an editing teacher - And there is a coursework - And the coursework "blindmarking" setting is "1" in the database - When I visit the coursework settings page - Then the field "blindmarking" matches value "1" + Scenario: The coursework settings can be changed + Given there is a course + And I am logged in as an editing teacher + And there is a coursework + And the coursework "blindmarking" setting is "1" in the database + When I visit the coursework settings page + Then the field "blindmarking" matches value "1" - Scenario: disabling general feedback alters the db setting (checkboxes bug is fixed - 0 was being interpreted as 1) - Given there is a course - And I am logged in as an editing teacher - When I visit the course page - And I turn editing mode on - When I add a "Coursework" to section "3" and I fill the form with: + Scenario: disabling general feedback alters the db setting (checkboxes bug is fixed - 0 was being interpreted as 1) + Given there is a course + And I am logged in as an editing teacher + When I visit the course page + And I turn editing mode on + When I add a "coursework" activity to course "C1" section "3" and I fill the form with: | name | Test coursework | | Description | Test coursework description | | blindmarking | 0 | - Then the coursework "blindmarking" setting should be "0" in the database + Then the coursework "blindmarking" setting should be "0" in the database - Scenario: logged in as a teacher works - Given there is a course - And I am logged in as a teacher - When I visit the course page - Then I should be on the course page - - Scenario: logged in as a manager works - Given there is a course - And I am logged in as a manager - When I visit the course page - Then I should be on the course page - - Scenario: logged in as a manager works when a student has been created - Given there is a course - And there is a student - Then I am logged in as a manager - - Scenario: Making a setting NULL - Given there is a course - And there is a coursework - And the coursework "individualfeedback" setting is "NULL" in the database - Then the coursework "blindmarking" setting should be "0" in the database + Scenario: logged in as a teacher works + Given there is a course + And I am logged in as a teacher + When I visit the course page + Then I should be on the course page + Scenario: logged in as a manager works + Given there is a course + And I am logged in as a manager + When I visit the course page + Then I should be on the course page + Scenario: logged in as a manager works when a student has been created + Given there is a course + And there is a student + Then I am logged in as a manager + Scenario: Making a setting NULL + Given there is a course + And there is a coursework + And the coursework "individualfeedback" setting is "NULL" in the database + Then the coursework "blindmarking" setting should be "0" in the database diff --git a/tests/behat/feedback_auto_release_without_cron.feature b/tests/behat/feedback_auto_release_without_cron.feature index 5c7bc465..73791ba9 100644 --- a/tests/behat/feedback_auto_release_without_cron.feature +++ b/tests/behat/feedback_auto_release_without_cron.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework Feature: Auto releasing the student feedback without cron As a student @@ -5,23 +6,23 @@ Feature: Auto releasing the student feedback without cron for automatic release passes So that I get the feedback I need and don't think the system is broken - Background: - Given there is a course - And there is a coursework - And the coursework is set to single marker - And there is a student - And the student has a submission - And there is a teacher - And there is feedback for the submission from the teacher + Background: + Given there is a course + And there is a coursework + And the coursework is set to single marker + And there is a student + And the student has a submission + And there is a teacher + And there is feedback for the submission from the teacher - Scenario: auto release happens after the deadline without the cron running - Given the coursework individual feedback release date has passed - When I log in as a student - And I visit the coursework page - Then I should see "Released to students" + Scenario: auto release happens after the deadline without the cron running + Given the coursework individual feedback release date has passed + When I log in as a student + And I visit the coursework page + Then I should see "Released to students" - Scenario: auto release does not happen before the deadline without the cron running - Given the coursework individual feedback release date has not passed - When I log in as a student - And I visit the coursework page - Then I should not see "Released to students" \ No newline at end of file + Scenario: auto release does not happen before the deadline without the cron running + Given the coursework individual feedback release date has not passed + When I log in as a student + And I visit the coursework page + Then I should not see "Released to students" diff --git a/tests/behat/feedback_collisions.feature b/tests/behat/feedback_collisions.feature index 5911ab87..83130de6 100644 --- a/tests/behat/feedback_collisions.feature +++ b/tests/behat/feedback_collisions.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework @mod_coursework_feedback_collisions @javascript Feature: Collisions: two people try to create feedback at the same time As a teacher @@ -5,47 +6,46 @@ Feature: Collisions: two people try to create feedback at the same time teacher has already done so So that I do not get a surprise when the grades I have awarded disappear - Background: - Given there is a course - And there is a coursework - And there is a student - And the student has a submission - And the submission is finalised + Background: + Given there is a course + And there is a coursework + And there is a student + And the student has a submission + And the submission is finalised - Scenario: Single marker: If I submit feedback and it's already been given then the form should reload with a warning - Given there is a teacher - And there is another teacher - And I am logged in as the other teacher - And the coursework is set to single marker - When I visit the coursework page - And I click the new single final feedback button for the student - And I have an assessor feedback - When I grade the submission using the simple form - Then I should be on the create feedback page - And I should see "has already submitted" - Then I should see the grade comment in the form on the page - And I should see the grade in the form on the page + Scenario: Single marker: If I submit feedback and it's already been given then the form should reload with a warning + Given there is a teacher + And there is another teacher + And I am logged in as the other teacher + And the coursework is set to single marker + When I visit the coursework page + And I click the new single final feedback button for the student + And I have an assessor feedback + When I grade the submission using the simple form + Then I should be on the create feedback page + And I should see "has already submitted" + Then I should see the grade comment in the form on the page + And I should see the grade in the form on the page - Scenario: Multiple marker: If I submit feedback and it's already been given then it should be given a new stage_identifier - Given there is a teacher - And there is another teacher - And I am logged in as the other teacher - And the coursework is set to double marker - When I visit the coursework page - And I click on the new feedback button for assessor 1 - And I have an assessor feedback - When I grade the submission using the simple form - Then I should be on the coursework page - - Scenario: Multiple marker: If I submit feedback and it's already been given by all teachers then it should fail - Given there is a teacher - And there is another teacher - And I am logged in as a manager - And the coursework is set to double marker - When I visit the coursework page - And I click on the new feedback button for assessor 1 - And I have an assessor feedback - And there is final feedback from the other teacher - When I grade the submission using the simple form - Then I should be on the create feedback page + Scenario: Multiple marker: If I submit feedback and it's already been given then it should be given a new stage_identifier + Given there is a teacher + And there is another teacher + And I am logged in as the other teacher + And the coursework is set to double marker + When I visit the coursework page + And I click on the new feedback button for assessor 1 + And I have an assessor feedback + When I grade the submission using the simple form + Then I should be on the coursework page + Scenario: Multiple marker: If I submit feedback and it's already been given by all teachers then it should fail + Given there is a teacher + And there is another teacher + And I am logged in as a manager + And the coursework is set to double marker + When I visit the coursework page + And I click on the new feedback button for assessor 1 + And I have an assessor feedback + And there is final feedback from the other teacher + When I grade the submission using the simple form + Then I should be on the create feedback page diff --git a/tests/behat/feedback_edit_feedback_within_specified_time.feature b/tests/behat/feedback_edit_feedback_within_specified_time.feature index eba2ce97..a797184a 100644 --- a/tests/behat/feedback_edit_feedback_within_specified_time.feature +++ b/tests/behat/feedback_edit_feedback_within_specified_time.feature @@ -1,11 +1,11 @@ - +@mod @mod_coursework Feature: Allow markers to edit their marking but only during specific marking stages As an initial marker I want to be able to edit my initial marking if I have made a mistake. So that if the marking stage is at final agreed grading there is a time window for initial marks edition to happen - Background: + Background: Given there is a course And there is a coursework And the coursework "allocationenabled" setting is "1" in the database @@ -17,23 +17,19 @@ Feature: Allow markers to edit their marking but only during specific marking st And the student has a submission And the submission is finalised - - Scenario: Edit own initial feedback before delayed time Given there are feedbacks from both teachers And I log in as the teacher And I visit the coursework page Then I should see the edit feedback button for the teacher's feedback - - @javascript + @javascript Scenario: Edit own initial feedback after delayed time Given there are feedbacks from both teachers And I wait "35" seconds And I log in as the teacher And I visit the coursework page - Then I should not see the edit feedback button for the teacher's feedback - + Then I should not see the edit feedback button for the teacher's feedback Scenario: Automatic agreement before delayed time Given the coursework "automaticagreementstrategy" setting is "percentage_distance" in the database @@ -50,7 +46,6 @@ Feature: Allow markers to edit their marking but only during specific marking st And I visit the coursework page Then I should not see the final grade on the multiple marker page - @javascript Scenario: Automatic agreement after delayed time Given the coursework "automaticagreementstrategy" setting is "percentage_distance" in the database @@ -64,6 +59,6 @@ Feature: Allow markers to edit their marking but only during specific marking st And I visit the coursework page And I click on the new feedback button for assessor 2 And I grade the submission as 63 without comments using the simple form - And I wait "50" seconds + And I wait "50" seconds And I visit the coursework page Then I should see the final grade as 67 on the multiple marker page diff --git a/tests/behat/feedback_files.feature b/tests/behat/feedback_files.feature index fe2bd721..989c846c 100644 --- a/tests/behat/feedback_files.feature +++ b/tests/behat/feedback_files.feature @@ -1,38 +1,37 @@ +@_file_upload Feature: Adding feedback files As a teacher I want to be able to add feedback files So that I can provide users with rich, detailed feedback - Background: - Given there is a course - And there is a coursework - And the coursework "numberofmarkers" setting is "1" in the database - And there is a student - And the student has a submission - And the submission is finalised - - @javascript - Scenario: I can upload any file type, regardless of the coursework file types - Given the coursework "filetypes" setting is "pdf" in the database - And I am logged in as a teacher - When I visit the coursework page - And I click the new single final feedback button for the student - And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager - Then I should see "1" elements in "Upload a file" filemanager - - @javascript - Scenario: Students see all the feedback files - Given I am logged in as a manager - When I visit the coursework page - And I click the new single final feedback button for the student - And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager - When I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager - And I press "Save changes" - And I publish the grades - And I log out - And I log in as a student - And I visit the coursework page - Then I should see two feedback files on the page + Background: + Given there is a course + And there is a coursework + And the coursework "numberofmarkers" setting is "1" in the database + And there is a student + And the student has a submission + And the submission is finalised + @javascript + Scenario: I can upload any file type, regardless of the coursework file types + Given the coursework "filetypes" setting is "pdf" in the database + And I am logged in as a teacher + When I visit the coursework page + And I click the new single final feedback button for the student + And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager + Then I should see "1" elements in "Upload a file" filemanager + @javascript + Scenario: Students see all the feedback files + Given I am logged in as a manager + When I visit the coursework page + And I click the new single final feedback button for the student + And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager + When I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager + And I press "Save changes" + And I publish the grades + And I log out + And I log in as a student + And I visit the coursework page + Then I should see two feedback files on the page diff --git a/tests/behat/feedback_final_feedback_double_marking.feature b/tests/behat/feedback_final_feedback_double_marking.feature index ad807395..e040c80d 100644 --- a/tests/behat/feedback_final_feedback_double_marking.feature +++ b/tests/behat/feedback_final_feedback_double_marking.feature @@ -5,54 +5,52 @@ Feature: Adding and editing final feedback As a course leader I want to be able to edit the final grade via a form - Background: - Given there is a course - And there is a coursework - And there is a teacher - And there is another teacher - And the coursework "numberofmarkers" setting is "2" in the database - And there is a student - And the student has a submission - And the submission is finalised - - Scenario: Setting the final feedback grade - Given there are feedbacks from both teachers - And I am logged in as a manager - And I visit the coursework page - When I click the new multiple final feedback button for the student - When I grade the submission using the simple form - Then I should be on the coursework page - And I should see the final grade on the multiple marker page - - Scenario: Setting the final feedback comment - Given there are feedbacks from both teachers - And I am logged in as a manager - And I visit the coursework page - When I click the new multiple final feedback button for the student - When I grade the submission using the simple form - Then I should be on the coursework page - When I click the edit final feedback button - Then I should see the grade comment in the form on the page - And I should see the grade in the form on the page - - Scenario: I can be both an initial assessor and the manager who agrees grades - And managers do not have the manage capability - Given I am logged in as a manager - And there are feedbacks from both me and another teacher - And I visit the coursework page - When I click the new multiple final feedback button for the student - And I grade the submission using the simple form - Then I should be on the coursework page - - Scenario: Editing final feedback from others - And managers do not have the manage capability - Given I am logged in as a manager - And there are feedbacks from both me and another teacher - And there is final feedback from the other teacher - When I visit the coursework page - When I click the edit final feedback button - And I should see the other teacher's final grade in the form on the page - And I grade the submission using the simple form - Then I should be on the coursework page - - + Background: + Given there is a course + And there is a coursework + And there is a teacher + And there is another teacher + And the coursework "numberofmarkers" setting is "2" in the database + And there is a student + And the student has a submission + And the submission is finalised + + Scenario: Setting the final feedback grade + Given there are feedbacks from both teachers + And I am logged in as a manager + And I visit the coursework page + When I click the new multiple final feedback button for the student + When I grade the submission using the simple form + Then I should be on the coursework page + And I should see the final grade on the multiple marker page + + Scenario: Setting the final feedback comment + Given there are feedbacks from both teachers + And I am logged in as a manager + And I visit the coursework page + When I click the new multiple final feedback button for the student + When I grade the submission using the simple form + Then I should be on the coursework page + When I click the edit final feedback button + Then I should see the grade comment in the form on the page + And I should see the grade in the form on the page + + Scenario: I can be both an initial assessor and the manager who agrees grades + And managers do not have the manage capability + Given I am logged in as a manager + And there are feedbacks from both me and another teacher + And I visit the coursework page + When I click the new multiple final feedback button for the student + And I grade the submission using the simple form + Then I should be on the coursework page + + Scenario: Editing final feedback from others + And managers do not have the manage capability + Given I am logged in as a manager + And there are feedbacks from both me and another teacher + And there is final feedback from the other teacher + When I visit the coursework page + When I click the edit final feedback button + And I should see the other teacher's final grade in the form on the page + And I grade the submission using the simple form + Then I should be on the coursework page diff --git a/tests/behat/feedback_general_feedback.feature b/tests/behat/feedback_general_feedback.feature index 52923edb..fbe6567e 100644 --- a/tests/behat/feedback_general_feedback.feature +++ b/tests/behat/feedback_general_feedback.feature @@ -5,59 +5,56 @@ Feature: general feedback I want to be able to provide some general feedback for all of the students before their individual feedback is released So that they can prepare effectively for upcoming exams or assignments - Scenario: enabling general feedback shows the place for managers to enter feedback - Given there is a course - And there is a coursework - And the coursework general feedback is enabled - And I am logged in as an manager - When I visit the coursework page - Then I should see "Add general feedback" - - Scenario: disabling general feedback does not hide the place for managers to enter feedback - Given there is a course - And there is a coursework - And the coursework general feedback is disabled - And I am logged in as an manager - When I visit the coursework page - Then I should see "Add general feedback" - - Scenario: enabling general feedback shows students the feedback deadline - Given there is a course - And there is a coursework - And the coursework general feedback is enabled - And I am logged in as a student - And I have a submission - When I visit the coursework page - And I should see "General feedback deadline" - - Scenario: enabling general feedback shows students the feedback when the deadline has passed - Given there is a course - And there is a coursework - And the coursework general feedback is enabled - And there is some general feedback - And the general feedback deadline has passed - And I am logged in as a student - And I have a submission - When I visit the coursework page - Then I should see "General feedback" - - Scenario: disabling general feedback hides the feedback from students - Given there is a course - And there is a coursework - And the coursework general feedback is disabled - And I am logged in as a student - When I visit the coursework page - Then I should not see "General feedback:" - And I should not see "General feedback deadline" - - Scenario: Users without permission cannot add or edit general feedback - Given there is a course - And there is a coursework - And the coursework general feedback is enabled - And I am logged in as an editing teacher - When I visit the coursework page - Then I should not see "Edit general feedback" - And I should not see "Add general feedback" - - - + Scenario: enabling general feedback shows the place for managers to enter feedback + Given there is a course + And there is a coursework + And the coursework general feedback is enabled + And I am logged in as an manager + When I visit the coursework page + Then I should see "Add general feedback" + + Scenario: disabling general feedback does not hide the place for managers to enter feedback + Given there is a course + And there is a coursework + And the coursework general feedback is disabled + And I am logged in as an manager + When I visit the coursework page + Then I should see "Add general feedback" + + Scenario: enabling general feedback shows students the feedback deadline + Given there is a course + And there is a coursework + And the coursework general feedback is enabled + And I am logged in as a student + And I have a submission + When I visit the coursework page + And I should see "General feedback deadline" + + Scenario: enabling general feedback shows students the feedback when the deadline has passed + Given there is a course + And there is a coursework + And the coursework general feedback is enabled + And there is some general feedback + And the general feedback deadline has passed + And I am logged in as a student + And I have a submission + When I visit the coursework page + Then I should see "General feedback" + + Scenario: disabling general feedback hides the feedback from students + Given there is a course + And there is a coursework + And the coursework general feedback is disabled + And I am logged in as a student + When I visit the coursework page + Then I should not see "General feedback:" + And I should not see "General feedback deadline" + + Scenario: Users without permission cannot add or edit general feedback + Given there is a course + And there is a coursework + And the coursework general feedback is enabled + And I am logged in as an editing teacher + When I visit the coursework page + Then I should not see "Edit general feedback" + And I should not see "Add general feedback" diff --git a/tests/behat/feedback_group_feedback_for_students.feature b/tests/behat/feedback_group_feedback_for_students.feature index 857585e4..30a3fa2a 100644 --- a/tests/behat/feedback_group_feedback_for_students.feature +++ b/tests/behat/feedback_group_feedback_for_students.feature @@ -5,42 +5,42 @@ Feature: Students see feedback on group assignments I want to be able to see the feedaback for the group assignment even if I did not submit it So that I know what my marks are and can improve my work - Background: - Given there is a course - And there is a coursework - And the coursework "use_groups" setting is "1" in the database - And the coursework is set to double marker - And there is a manager - And there is a student - And the student is a member of a group - And there is another student - And the other student is a member of the group - And the group has a submission - And the submission is finalised - And there is final feedback - And the grades have been published + Background: + Given there is a course + And there is a coursework + And the coursework "use_groups" setting is "1" in the database + And the coursework is set to double marker + And there is a manager + And there is a student + And the student is a member of a group + And there is another student + And the other student is a member of the group + And the group has a submission + And the submission is finalised + And there is final feedback + And the grades have been published - Scenario: I can see the published grade when someone else submitted - Given I am logged in as the other student - When I visit the coursework page - Then I should see the grade for the group submission - And I should see the feedback for the group submission + Scenario: I can see the published grade when someone else submitted + Given I am logged in as the other student + When I visit the coursework page + Then I should see the grade for the group submission + And I should see the feedback for the group submission - Scenario: I can see the published grade when I submitted - Given I am logged in as the student - When I visit the coursework page - Then I should see the grade for the group submission - And I should see the feedback for the group submission + Scenario: I can see the published grade when I submitted + Given I am logged in as the student + When I visit the coursework page + Then I should see the grade for the group submission + And I should see the feedback for the group submission - @broken - Scenario: I can see the published grade in the gradebook when someone else submitted - Given I am logged in as the other student - And I visit the coursework page - When I visit the gradebook page - Then I should see the grade in the gradebook + @broken + Scenario: I can see the published grade in the gradebook when someone else submitted + Given I am logged in as the other student + And I visit the coursework page + When I visit the gradebook page + Then I should see the grade in the gradebook - @broken - Scenario: I can see the published grade in the gradebook when I submitted - Given I am logged in as the student - When I visit the gradebook page - Then I should see the grade in the gradebook + @broken + Scenario: I can see the published grade in the gradebook when I submitted + Given I am logged in as the student + When I visit the gradebook page + Then I should see the grade in the gradebook diff --git a/tests/behat/feedback_group_marking.feature b/tests/behat/feedback_group_marking.feature index d788c225..90c6d074 100644 --- a/tests/behat/feedback_group_marking.feature +++ b/tests/behat/feedback_group_marking.feature @@ -6,26 +6,26 @@ Feature: Marking the group submissions applies the grades to the whole group So that the marks are awarded to all of the group members and they can see their feedback and grades - Background: - Given there is a course - And there is a coursework - And there is a teacher - And there is another teacher - And the coursework "numberofmarkers" setting is "2" in the database - And the coursework "use_groups" setting is "1" in the database - And there is a student - And the student is a member of a group - And there is another student - And the other student is a member of the group - And the group has a submission - And the submission is finalised - And there are feedbacks from both teachers - And I am logged in as a manager + Background: + Given there is a course + And there is a coursework + And there is a teacher + And there is another teacher + And the coursework "numberofmarkers" setting is "2" in the database + And the coursework "use_groups" setting is "1" in the database + And there is a student + And the student is a member of a group + And there is another student + And the other student is a member of the group + And the group has a submission + And the submission is finalised + And there are feedbacks from both teachers + And I am logged in as a manager - Scenario: grading the submission makes the grades show up for both students in the interface - Given I am on the coursework page - When I click the new final feedback button for the group - And show me the page - And I grade the submission using the simple form - Then I should be on the coursework page - And I should see the final grade for the group in the grading interface + Scenario: grading the submission makes the grades show up for both students in the interface + Given I visit the coursework page + When I click the new final feedback button for the group + And show me the page + And I grade the submission using the simple form + Then I should be on the coursework page + And I should see the final grade for the group in the grading interface diff --git a/tests/behat/feedback_multiple_assessor_feedback.feature b/tests/behat/feedback_multiple_assessor_feedback.feature index 017c779c..165c0110 100644 --- a/tests/behat/feedback_multiple_assessor_feedback.feature +++ b/tests/behat/feedback_multiple_assessor_feedback.feature @@ -5,95 +5,92 @@ Feature: Multiple assessors simple grading form I want there to be a simple grading form So that I can give students a grade and a feedback comment without any frustrating extra work - Background: - Given there is a course - And the following "permission overrides" exist: + Background: + Given there is a course + And the following "permission overrides" exist: | capability | permission | role | contextlevel | reference | | mod/coursework:editinitialgrade | Allow | teacher | Course | C1 | - And there is a coursework - And the coursework "numberofmarkers" setting is "2" in the database - And the coursework "allocationenabled" setting is "0" in the database - And there is a student - And the student has a submission + And there is a coursework + And the coursework "numberofmarkers" setting is "2" in the database + And the coursework "allocationenabled" setting is "0" in the database + And there is a student + And the student has a submission - Scenario: Grades can be saved - Given I am logged in as a teacher - And the submission is finalised - And I visit the coursework page - And I click on the new feedback button for assessor 1 - When I grade the submission using the simple form - Then I should see the grade on the page + Scenario: Grades can be saved + Given I am logged in as a teacher + And the submission is finalised + And I visit the coursework page + And I click on the new feedback button for assessor 1 + When I grade the submission using the simple form + Then I should see the grade on the page - Scenario: Grade comments can be saved - Given I am logged in as a teacher - And the submission is finalised - And I visit the coursework page - And I click on the new feedback button for assessor 1 - When I grade the submission using the simple form - And I visit the edit feedback page - Then I should see the grade comment in the form on the page + Scenario: Grade comments can be saved + Given I am logged in as a teacher + And the submission is finalised + And I visit the coursework page + And I click on the new feedback button for assessor 1 + When I grade the submission using the simple form + And I visit the edit feedback page + Then I should see the grade comment in the form on the page - @javascript - Scenario: Grade files can be saved - Given I am logged in as a teacher - And the submission is finalised - And I visit the coursework page - And I click on the new feedback button for assessor 1 - When I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Save and finalise" - And I click on the edit feedback icon - Then I should be on the edit feedback page - Then I should see "1" elements in "Upload a file" filemanager + @javascript + Scenario: Grade files can be saved + Given I am logged in as a teacher + And the submission is finalised + And I visit the coursework page + And I click on the new feedback button for assessor 1 + When I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Save and finalise" + And I click on the edit feedback icon + Then I should be on the edit feedback page + Then I should see "1" elements in "Upload a file" filemanager - Scenario: Grade comments can be edited - Given I am logged in as a teacher - And the submission is finalised - And I have an assessor feedback - And I visit the coursework page - And I click on the edit feedback icon - Then I should see the grade comment in the form on the page + Scenario: Grade comments can be edited + Given I am logged in as a teacher + And the submission is finalised + And I have an assessor feedback + And I visit the coursework page + And I click on the edit feedback icon + Then I should see the grade comment in the form on the page - Scenario: Grades can not be edited by other teachers - Given there is a teacher - And there is another teacher - And there is feedback for the submission from the teacher - And I am logged in as the other teacher - And the submission is finalised - When I visit the coursework page - Then show me the page - Then I should not see the edit feedback button for the teacher's feedback + Scenario: Grades can not be edited by other teachers + Given there is a teacher + And there is another teacher + And there is feedback for the submission from the teacher + And I am logged in as the other teacher + And the submission is finalised + When I visit the coursework page + Then show me the page + Then I should not see the edit feedback button for the teacher's feedback - @javascript - Scenario: Grade files can be edited and more are added - Given I am logged in as a teacher - And the submission is finalised - And I visit the coursework page - And I click on the new feedback button for assessor 1 - And I wait "1" seconds - When I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Save and finalise" - And I click on the edit feedback icon - And I wait "2" seconds - And I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager - Then I should see "2" elements in "Upload a file" filemanager - - When I press "Save and finalise" - And I click on the edit feedback icon - And I wait "1" seconds - Then I should see "2" elements in "Upload a file" filemanager - - Scenario: I should not see the feedback icon when the submisison has not been finalised - Given I am logged in as a teacher - And I visit the coursework page - Then I should not see a link to add feedback - - Scenario: managers can grade the initial stages - Given I am logged in as a manager - And the submission is finalised - And I visit the coursework page - And I click on the new feedback button for assessor 1 - When I grade the submission using the simple form - Then I should see the grade on the page + @javascript @_file_upload + Scenario: Grade files can be edited and more are added + Given I am logged in as a teacher + And the submission is finalised + And I visit the coursework page + And I click on the new feedback button for assessor 1 + And I wait "1" seconds + When I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Save and finalise" + And I click on the edit feedback icon + And I wait "2" seconds + And I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager + Then I should see "2" elements in "Upload a file" filemanager + When I press "Save and finalise" + And I click on the edit feedback icon + And I wait "1" seconds + Then I should see "2" elements in "Upload a file" filemanager + Scenario: I should not see the feedback icon when the submisison has not been finalised + Given I am logged in as a teacher + And I visit the coursework page + Then I should not see a link to add feedback + Scenario: managers can grade the initial stages + Given I am logged in as a manager + And the submission is finalised + And I visit the coursework page + And I click on the new feedback button for assessor 1 + When I grade the submission using the simple form + Then I should see the grade on the page diff --git a/tests/behat/feedback_publishing_grades.feature b/tests/behat/feedback_publishing_grades.feature index 432b8703..cb5e17a7 100644 --- a/tests/behat/feedback_publishing_grades.feature +++ b/tests/behat/feedback_publishing_grades.feature @@ -5,44 +5,44 @@ Feature: publishing grades to the students As a manager I want to be able to publish the grades when I am ready to - Background: - Given there is a course - And there is a coursework - And the coursework "numberofmarkers" setting is "1" in the database - And the coursework "blindmarking" setting is "0" in the database - And the coursework "moderationenabled" setting is "0" in the database - And there is a student - And the student has a submission - And the submission is finalised + Background: + Given there is a course + And there is a coursework + And the coursework "numberofmarkers" setting is "1" in the database + And the coursework "blindmarking" setting is "0" in the database + And the coursework "moderationenabled" setting is "0" in the database + And there is a student + And the student has a submission + And the submission is finalised - Scenario: Not publishing with double marking hides feedback from the student - Given there is a teacher - And there is another teacher - And the coursework "numberofmarkers" setting is "2" in the database - And there are feedbacks from both teachers - And I am logged in as a manager - When I visit the coursework page - And I click the new multiple final feedback button for the student - And I grade the submission using the simple form - And I log out - And I log in as the student - And I visit the coursework page - Then I should not see the final grade on the student page - And I should not see the grade comment on the student page + Scenario: Not publishing with double marking hides feedback from the student + Given there is a teacher + And there is another teacher + And the coursework "numberofmarkers" setting is "2" in the database + And there are feedbacks from both teachers + And I am logged in as a manager + When I visit the coursework page + And I click the new multiple final feedback button for the student + And I grade the submission using the simple form + And I log out + And I log in as the student + And I visit the coursework page + Then I should not see the final grade on the student page + And I should not see the grade comment on the student page - Scenario: Deliberate publishing with double marking shows feedback to the student - Given there is a teacher - And there is another teacher - And the coursework "numberofmarkers" setting is "2" in the database - And there are feedbacks from both teachers - And I am logged in as a manager + Scenario: Deliberate publishing with double marking shows feedback to the student + Given there is a teacher + And there is another teacher + And the coursework "numberofmarkers" setting is "2" in the database + And there are feedbacks from both teachers + And I am logged in as a manager - When I visit the coursework page - And I click the new multiple final feedback button for the student - And I grade the submission using the simple form - And I press the publish button - And I log out - And I log in as the student - And I visit the coursework page - Then I should see the final grade on the student page - And I should see the grade comment on the student page \ No newline at end of file + When I visit the coursework page + And I click the new multiple final feedback button for the student + And I grade the submission using the simple form + And I press the publish button + And I log out + And I log in as the student + And I visit the coursework page + Then I should see the final grade on the student page + And I should see the grade comment on the student page diff --git a/tests/behat/feedback_restrict_feedback_editing.feature b/tests/behat/feedback_restrict_feedback_editing.feature deleted file mode 100644 index 9187cc93..00000000 --- a/tests/behat/feedback_restrict_feedback_editing.feature +++ /dev/null @@ -1,7 +0,0 @@ -Feature: Resticting the editing of feedback by the assessors who added it - - As a course leader - I want to be sure that assessor cannot modify their feedback after they have left it - So that I can be sure that the grades are fair and no later changes happened due to - later finding out about other people's grades - diff --git a/tests/behat/feedback_rubrics.feature b/tests/behat/feedback_rubrics.feature index 30fcac22..8ed8381d 100644 --- a/tests/behat/feedback_rubrics.feature +++ b/tests/behat/feedback_rubrics.feature @@ -6,48 +6,47 @@ Feature: Adding feedback using the built in Moodle rubrics in a standardised way So that I can grade the work faster, give more consistent responses and make the process more fair - Background: - Given there is a course - And there is a coursework - And the coursework "numberofmarkers" setting is "1" in the database - And there is a student - And the student has a submission - And the submission is finalised - And I am logged in as a teacher + Background: + Given there is a course + And there is a coursework + And the coursework "numberofmarkers" setting is "1" in the database + And there is a student + And the student has a submission + And the submission is finalised + And I am logged in as a teacher - Scenario: I should be able to add feedback using a simple rubric - Given there is a rubric defined for the coursework - Given I visit the coursework page - When I click the new single final feedback button for the student - And I grade by filling the rubric with: + Scenario: I should be able to add feedback using a simple rubric + Given there is a rubric defined for the coursework + Given I visit the coursework page + When I click the new single final feedback button for the student + And I grade by filling the rubric with: | first criterion | 1 | Very good | - And I fill in the rest of the form after the rubric and submit it - And I log out - And I log in as a manager - And I visit the coursework page - And I publish the grades - And I log out - And I log in as a student - And I visit the coursework page - Then I should see the rubric grade on the page - And I should see the grade comment on the student page + And I fill in the rest of the form after the rubric and submit it + And I log out + And I log in as a manager + And I visit the coursework page + And I publish the grades + And I log out + And I log in as a student + And I visit the coursework page + Then I should see the rubric grade on the page + And I should see the grade comment on the student page - @broken - Scenario: I should see the rubric grade show up in the gradebook - Given there is a rubric defined for the coursework - Given I visit the coursework page - When I click the new single final feedback button for the student - And I grade by filling the rubric with: + @broken + Scenario: I should see the rubric grade show up in the gradebook + Given there is a rubric defined for the coursework + Given I visit the coursework page + When I click the new single final feedback button for the student + And I grade by filling the rubric with: | first criterion | 1 | Very good | - And I fill in the rest of the form after the rubric and submit it - And I log out - And I log in as a manager - And I visit the coursework page - And I publish the grades - And I log out - And I log in as a student - When I visit the gradebook page - Then I should see the rubric grade in the gradebook - When I visit the coursework page - And I should see the grade comment on the student page - + And I fill in the rest of the form after the rubric and submit it + And I log out + And I log in as a manager + And I visit the coursework page + And I publish the grades + And I log out + And I log in as a student + When I visit the gradebook page + Then I should see the rubric grade in the gradebook + When I visit the coursework page + And I should see the grade comment on the student page diff --git a/tests/behat/feedback_single_marking.feature b/tests/behat/feedback_single_marking.feature index e985c733..60649a43 100644 --- a/tests/behat/feedback_single_marking.feature +++ b/tests/behat/feedback_single_marking.feature @@ -5,44 +5,43 @@ Feature: Adding and editing single feedback As a course leader I want to be able to edit the final grade via a form - Background: - Given there is a course - And there is a coursework - And the coursework "numberofmarkers" setting is "1" in the database - And there is a student - And there is a teacher - And the student has a submission - And the teacher has a capability to edit their own initial feedbacks - And I log in as the teacher + Background: + Given there is a course + And there is a coursework + And the coursework "numberofmarkers" setting is "1" in the database + And there is a student + And there is a teacher + And the student has a submission + And the teacher has a capability to edit their own initial feedbacks + And I log in as the teacher - Scenario: Setting the final feedback grade - Given the submission is finalised - And the coursework deadline has passed - And I visit the coursework page - When I click the new single final feedback button for the student - When I grade the submission using the simple form - Then I should be on the coursework page - And I should see the final grade on the single marker page + Scenario: Setting the final feedback grade + Given the submission is finalised + And the coursework deadline has passed + And I visit the coursework page + When I click the new single final feedback button for the student + When I grade the submission using the simple form + Then I should be on the coursework page + And I should see the final grade on the single marker page - Scenario: Setting the final feedback comment - Given the submission is finalised - And I visit the coursework page - When I click the new single final feedback button for the student - When I grade the submission using the simple form - Then I should be on the coursework page - When I click the edit final feedback button - Then I should see the grade comment in the form on the page - And I should see the grade in the form on the page + Scenario: Setting the final feedback comment + Given the submission is finalised + And I visit the coursework page + When I click the new single final feedback button for the student + When I grade the submission using the simple form + Then I should be on the coursework page + When I click the edit final feedback button + Then I should see the grade comment in the form on the page + And I should see the grade in the form on the page - Scenario: I should not see the feedback icon when the submisison has not been finalised - And I visit the coursework page - Then I should not see a link to add feedback - - Scenario: Editing someone elses grade - Given the submission is finalised - And there is feedback for the submission from the teacher - And I visit the coursework page - When I click the edit final feedback button - Then I should see the grade comment as "Blah" in the form on the page - And I should see the other teacher's grade in the form on the page + Scenario: I should not see the feedback icon when the submisison has not been finalised + And I visit the coursework page + Then I should not see a link to add feedback + Scenario: Editing someone elses grade + Given the submission is finalised + And there is feedback for the submission from the teacher + And I visit the coursework page + When I click the edit final feedback button + Then I should see the grade comment as "Blah" in the form on the page + And I should see the other teacher's grade in the form on the page diff --git a/tests/behat/feedback_zero_grades.feature b/tests/behat/feedback_zero_grades.feature index 5c66ebfd..f5a0f70c 100644 --- a/tests/behat/feedback_zero_grades.feature +++ b/tests/behat/feedback_zero_grades.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework Feature: Zero grades should show up just like the others As a teacher @@ -5,20 +6,19 @@ Feature: Zero grades should show up just like the others So that in case there is no work submitted or the work is truly and irredeemably useless, the student will know - Background: - Given there is a course - And there is a coursework - And there is a student - And the student has a submission - And the submission is finalised - - Scenario: Single maker final feedback - Given the coursework "grade" setting is "9" in the database - Given I am logged in as a teacher - And the coursework "numberofmarkers" setting is "1" in the database - When I visit the coursework page - And I click the new single final feedback button for the student - And I grade the submission as 0 using the simple form - Then I should be on the coursework page - And I should see the final grade as 0 on the single marker page + Background: + Given there is a course + And there is a coursework + And there is a student + And the student has a submission + And the submission is finalised + Scenario: Single maker final feedback + Given the coursework "grade" setting is "9" in the database + Given I am logged in as a teacher + And the coursework "numberofmarkers" setting is "1" in the database + When I visit the coursework page + And I click the new single final feedback button for the student + And I grade the submission as 0 using the simple form + Then I should be on the coursework page + And I should see the final grade as 0 on the single marker page diff --git a/tests/behat/installation_and_set_up.feature b/tests/behat/installation_and_set_up.feature index 4ea75f2d..f5341016 100644 --- a/tests/behat/installation_and_set_up.feature +++ b/tests/behat/installation_and_set_up.feature @@ -5,27 +5,24 @@ Feature: Installing the coursework module and making sure it works As an admin I need to be able to successfully install the module in a course and add an instance - @javascript - Scenario: I can add a new instance of the coursework module to a course - Given there is a course - And I am logged in as an editing teacher - And I visit the course page - And I turn editing mode on - When I add a "Coursework" to section "3" and I fill the form with: + @javascript + Scenario: I can add a new instance of the coursework module to a course + Given there is a course + And I am logged in as an editing teacher + And I visit the course page + And I turn editing mode on + When I add a "coursework" activity to course "C1" section "3" and I fill the form with: | name | Test coursework | | Description | Test coursework description | - Then I should be on the course page + Then I should be on the course page - Scenario: The module can be used with course completion enabled - Given there is a course - And I am logged in as an editing teacher - And the course has completion enabled - When I visit the course page - And I turn editing mode on - When I add a "Coursework" to section "3" and I fill the form with: + Scenario: The module can be used with course completion enabled + Given there is a course + And I am logged in as an editing teacher + And the course has completion enabled + When I visit the course page + And I turn editing mode on + When I add a "coursework" activity to course "C1" section "3" and I fill the form with: | name | Test coursework | | Description | Test coursework description | - Then I should be on the course page - - - + Then I should be on the course page diff --git a/tests/behat/sampling_automatic_sampling.feature b/tests/behat/sampling_automatic_sampling.feature index 44774e15..299fbd89 100644 --- a/tests/behat/sampling_automatic_sampling.feature +++ b/tests/behat/sampling_automatic_sampling.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework Feature: Automatic sampling using total number of students in stage 1 and 2 As a course administrator setting up a coursework instance for a large group of students @@ -17,19 +18,17 @@ Feature: Automatic sampling using total number of students in stage 1 and 2 Scenario: Automatically allocating a total for stage 2 based on stage 1 Given the coursework "numberofmarkers" setting is "2" in the database And the coursework "samplingenabled" setting is "1" in the database - And I am on the allocations page + And I visit the allocations page When I enable automatic sampling for stage 2 And I enable total rule for stage 2 And I select 50% of total students in stage 1 And I save sampling strategy - Then a student or another student should be automatically included in sample for stage 2 - - + Then a student or another student should be automatically included in sample for stage 2 Scenario: Automatically allocating a total for stage 3 based on stage 2 Given the coursework "numberofmarkers" setting is "3" in the database And the coursework "samplingenabled" setting is "1" in the database - And I am on the allocations page + And I visit the allocations page When I enable automatic sampling for stage 2 And I enable total rule for stage 2 And I select 100% of total students in stage 1 @@ -39,24 +38,12 @@ Feature: Automatic sampling using total number of students in stage 1 and 2 And I save sampling strategy Then a student or another student should be automatically included in sample for stage 3 - - Scenario: Automatically allocating a total for stage 3 based on stage 1 Given the coursework "numberofmarkers" setting is "3" in the database And the coursework "samplingenabled" setting is "1" in the database - And I am on the allocations page + And I visit the allocations page When I enable automatic sampling for stage 3 And I enable total rule for stage 3 And I select 50% of total students in stage 1 And I save sampling strategy Then a student or another student should be automatically included in sample for stage 3 - - - - - - - - - - diff --git a/tests/behat/sampling_manual_sampling.feature b/tests/behat/sampling_manual_sampling.feature index a84b1955..5a7c3cb2 100644 --- a/tests/behat/sampling_manual_sampling.feature +++ b/tests/behat/sampling_manual_sampling.feature @@ -5,49 +5,46 @@ Feature: Manual sampling I can manually select the submissions to be included in the sample for a single feedback stage So I can select correct sample of students for double marking - Background: - Given there is a course - And I am logged in as a manager - And the manager has a capability to allocate students in samplings - And there is a coursework - And the coursework allocation option is disabled - And the coursework has sampling enabled - And the coursework is set to double marker - And there is a student - And there is a teacher - And the teacher has a capability to mark submissions - And there is another teacher - And the student has a submission - And there is feedback for the submission from the other teacher - And the submission deadline has passed - And the submission is finalised - - - Scenario: Manual sampling should include student when selected - When I visit the allocations page - And I select a student as a part of the sample for the second stage - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should be able to add the second grade for this student - - - Scenario: Manual sampling should not include student when not selected - When I visit the allocations page - And I deselect a student as a part of the sample for the second stage - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should not be able to add the second grade for this student - - - Scenario: Single grade should go to the gradebook column when only first stage is in sample - When I visit the allocations page - And I deselect a student as a part of the sample for the second stage - And I save everything - And I log out - And I log in as the teacher - And I visit the coursework page - Then I should see the grade given by the initial teacher in the provisional grade column + Background: + Given there is a course + And I am logged in as a manager + And the manager has a capability to allocate students in samplings + And there is a coursework + And the coursework allocation option is disabled + And the coursework has sampling enabled + And the coursework is set to double marker + And there is a student + And there is a teacher + And the teacher has a capability to mark submissions + And there is another teacher + And the student has a submission + And there is feedback for the submission from the other teacher + And the submission deadline has passed + And the submission is finalised + + Scenario: Manual sampling should include student when selected + When I visit the allocations page + And I select a student as a part of the sample for the second stage + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should be able to add the second grade for this student + + Scenario: Manual sampling should not include student when not selected + When I visit the allocations page + And I deselect a student as a part of the sample for the second stage + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should not be able to add the second grade for this student + + Scenario: Single grade should go to the gradebook column when only first stage is in sample + When I visit the allocations page + And I deselect a student as a part of the sample for the second stage + And I save everything + And I log out + And I log in as the teacher + And I visit the coursework page + Then I should see the grade given by the initial teacher in the provisional grade column diff --git a/tests/behat/sampling_sample_range_set_rules.feature b/tests/behat/sampling_sample_range_set_rules.feature index 53ba5026..71714f77 100644 --- a/tests/behat/sampling_sample_range_set_rules.feature +++ b/tests/behat/sampling_sample_range_set_rules.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework Feature: Automatic sample based on range set grades using marking of students in stage 1 and 2 As a manager, I want to be able to automatically allocate assessors to students @@ -26,10 +27,9 @@ Feature: Automatic sample based on range set grades using marking of students in And I grade the submission as 45 using the simple form And I log out - Scenario: Automatically allocating a set of students within specified grade rule range in stage 2 based on stage 1 grades Given I am logged in as a manager - And I am on the allocations page + And I visit the allocations page And I enable automatic sampling for stage 2 And show me the page And I enable grade range rule 1 for stage 2 @@ -50,11 +50,9 @@ Feature: Automatic sample based on range set grades using marking of students in #Then a student should be automatically included in sample for stage 2 #And another student should be automatically included in sample for stage 2 - - Scenario: Automatically allocating a set of students within specified percentage rule range in stage 3 based on stage 2 grades Given I am logged in as a manager - And I am on the allocations page + And I visit the allocations page And I enable automatic sampling for stage 2 And I enable total rule for stage 2 And I select 100% of total students in stage 1 @@ -66,7 +64,7 @@ Feature: Automatic sample based on range set grades using marking of students in And I grade the submission as 40 using the simple form And I log out And I am logged in as a manager - And I am on the allocations page + And I visit the allocations page When I enable automatic sampling for stage 3 And I enable grade range rule 1 for stage 3 And I select limit type for grade range rule 1 in stage 3 as "percentage" @@ -75,13 +73,3 @@ Feature: Automatic sample based on range set grades using marking of students in And I save sampling strategy Then a student should be automatically included in sample for stage 3 And another student should not be automatically included in sample for stage 3 - - - - - - - - - - diff --git a/tests/behat/submissions_agree_submission_terms.feature b/tests/behat/submissions_agree_submission_terms.feature index 35ede8d9..b94f931e 100644 --- a/tests/behat/submissions_agree_submission_terms.feature +++ b/tests/behat/submissions_agree_submission_terms.feature @@ -1,96 +1,95 @@ -@mod @mod_coursework +@mod @mod_coursework @_file_upload Feature: Students must agree to terms before submitting anything As a manger I want to be able to force students to agree to terms and conditions So that we are legally protected in case of disputes over plagiarism and the students can't cheat - Background: - Given there is a course - And there is a coursework - And I am logged in as a student + Background: + Given there is a course + And there is a coursework + And I am logged in as a student - Scenario: I see the terms when the site has the option enabled - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - When I visit the coursework page - And I click on the new submission button - Then I should be on the new submission page - And I should see "Some text" + Scenario: I see the terms when the site has the option enabled + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + When I visit the coursework page + And I click on the new submission button + Then I should be on the new submission page + And I should see "Some text" - Scenario: I do not see the terms when the site has the option disabled - Given the sitewide "coursework_agree_terms" setting is "0" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - When I visit the coursework page - And I click on the new submission button - Then I should be on the new submission page - And I should not see "Some text" + Scenario: I do not see the terms when the site has the option disabled + Given the sitewide "coursework_agree_terms" setting is "0" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + When I visit the coursework page + And I click on the new submission button + Then I should be on the new submission page + And I should not see "Some text" - @javascript - Scenario: The submission is saved when the agree terms checkbox is checked during create - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I set the field "termsagreed" to "1" - And I press "Submit" - Then I should be on the coursework page + @javascript + Scenario: The submission is saved when the agree terms checkbox is checked during create + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I set the field "termsagreed" to "1" + And I press "Submit" + Then I should be on the coursework page - @javascript - Scenario: The submission is not saved when the agree terms checkbox is not checked during create - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Submit" - Then I should be on the create submission page + @javascript + Scenario: The submission is not saved when the agree terms checkbox is not checked during create + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Submit" + Then I should be on the create submission page - @javascript - Scenario: The submission is saved when the agree terms checkbox is checked during update - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - And the student has a submission - When I visit the coursework page - And I click on the edit submission button - And I set the field "termsagreed" to "1" - And I press "Submit" - Then I should be on the coursework page + @javascript + Scenario: The submission is saved when the agree terms checkbox is checked during update + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + And the student has a submission + When I visit the coursework page + And I click on the edit submission button + And I set the field "termsagreed" to "1" + And I press "Submit" + Then I should be on the coursework page - @javascript - Scenario: The submission is not saved when the agree terms checkbox is not checked during update - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - And the student has a submission - When I visit the coursework page - And I click on the edit submission button - And I press "Submit" - Then I should be on the update submission page + @javascript + Scenario: The submission is not saved when the agree terms checkbox is not checked during update + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + And the student has a submission + When I visit the coursework page + And I click on the edit submission button + And I press "Submit" + Then I should be on the update submission page - @javascript - Scenario: The file should not be saved if the agree terms are skipped on create - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Submit" - Then I should be on the create submission page - When I visit the coursework page - Then I should not see the file on the page - - @javascript - Scenario: The file should not be saved if the agree terms are skipped on update - Given the sitewide "coursework_agree_terms" setting is "1" - And the sitewide "coursework_agree_terms_text" setting is "Some text" - And the coursework "maxfiles" setting is "2" in the database - And the student has a submission - When I visit the coursework page - And I click on the edit submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Submit" - Then I should be on the update submission page - When I visit the coursework page - Then I should see 1 file on the page + @javascript + Scenario: The file should not be saved if the agree terms are skipped on create + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Submit" + Then I should be on the create submission page + When I visit the coursework page + Then I should not see the file on the page + @javascript + Scenario: The file should not be saved if the agree terms are skipped on update + Given the sitewide "coursework_agree_terms" setting is "1" + And the sitewide "coursework_agree_terms_text" setting is "Some text" + And the coursework "maxfiles" setting is "2" in the database + And the student has a submission + When I visit the coursework page + And I click on the edit submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Submit" + Then I should be on the update submission page + When I visit the coursework page + Then I should see 1 file on the page diff --git a/tests/behat/submissions_auto_finalisation.feature b/tests/behat/submissions_auto_finalisation.feature index b8edc44b..18b19cc8 100644 --- a/tests/behat/submissions_auto_finalisation.feature +++ b/tests/behat/submissions_auto_finalisation.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework Feature: Auto finalising before cron runs As a teacher @@ -5,19 +6,19 @@ Feature: Auto finalising before cron runs wait for the cron to run So that I can start marking immediately - Background: - Given there is a course - And there is a coursework - And there is a student - And the student has a submission + Background: + Given there is a course + And there is a coursework + And there is a student + And the student has a submission - Scenario: Teacher visits the page and sees the submission is finalised when the deadline has passed - Given I am logged in as a teacher - And the coursework deadline has passed - When I visit the coursework page - Then I should see "Ready to grade" + Scenario: Teacher visits the page and sees the submission is finalised when the deadline has passed + Given I am logged in as a teacher + And the coursework deadline has passed + When I visit the coursework page + Then I should see "Ready to grade" - Scenario: Teacher visits the page and sees the submission is not finalised when the deadline has not passed - Given I am logged in as a teacher - When I visit the coursework page - Then I should not see "Ready to grade" + Scenario: Teacher visits the page and sees the submission is not finalised when the deadline has not passed + Given I am logged in as a teacher + When I visit the coursework page + Then I should not see "Ready to grade" diff --git a/tests/behat/submissions_deadlines.feature b/tests/behat/submissions_deadlines.feature index 934338fa..930ead3e 100644 --- a/tests/behat/submissions_deadlines.feature +++ b/tests/behat/submissions_deadlines.feature @@ -5,28 +5,28 @@ Feature: Deadlines for submissions I want to set deadlines that are viible to the student So that they know when they are expected to submut, and can be sent automatic reminders - Background: - Given there is a course - And I am logged in as a teacher - And there is a coursework + Background: + Given there is a course + And I am logged in as a teacher + And there is a coursework - Scenario: the general feedback deadline should be visible if enabled and set - Given the coursework "generalfeedback" setting is "777777" in the database - And the coursework general feedback is enabled - When I visit the coursework page - Then I should see the date when the general feedback will be released + Scenario: the general feedback deadline should be visible if enabled and set + Given the coursework "generalfeedback" setting is "777777" in the database + And the coursework general feedback is enabled + When I visit the coursework page + Then I should see the date when the general feedback will be released - Scenario: the individual feedback deadline should not be visible if not enabled - Given the coursework "individualfeedback" setting is "0" in the database - When I visit the coursework page - Then I should not see the date when the individual feedback will be released + Scenario: the individual feedback deadline should not be visible if not enabled + Given the coursework "individualfeedback" setting is "0" in the database + When I visit the coursework page + Then I should not see the date when the individual feedback will be released - Scenario: the individual feedback deadline should be visible if enabled - Given the coursework "individualfeedback" setting is "777777" in the database - When I visit the coursework page - Then I should see the date when the individual feedback will be released + Scenario: the individual feedback deadline should be visible if enabled + Given the coursework "individualfeedback" setting is "777777" in the database + When I visit the coursework page + Then I should see the date when the individual feedback will be released - Scenario: the general feedback deadline should be visible if not enabled - Given the coursework "individualfeedback" setting is "7777777" in the database - When I visit the coursework page - Then I should see the date when the individual feedback will be released \ No newline at end of file + Scenario: the general feedback deadline should be visible if not enabled + Given the coursework "individualfeedback" setting is "7777777" in the database + When I visit the coursework page + Then I should see the date when the individual feedback will be released diff --git a/tests/behat/submissions_early_finalisation.feature b/tests/behat/submissions_early_finalisation.feature index 5e2ad2b8..05ac7c8e 100644 --- a/tests/behat/submissions_early_finalisation.feature +++ b/tests/behat/submissions_early_finalisation.feature @@ -1,3 +1,4 @@ +@mod @mod_coursework Feature: Early finalisation of student submissions As a teacher @@ -5,47 +6,47 @@ Feature: Early finalisation of student submissions So that there is a way to know when something is ready to mark before the deadline is due and I can plan my grading work more effectively - Background: - Given there is a course - And there is a coursework - And the coursework "allowearlyfinalisation" setting is "1" in the database - And I am logged in as a student + Background: + Given there is a course + And there is a coursework + And the coursework "allowearlyfinalisation" setting is "1" in the database + And I am logged in as a student - @javascript - Scenario: I upload a file and finalise it immediately - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I save and finalise the submission - And I visit the coursework page - Then I should see the file on the page - And I should not see the edit submission button - And I should not see the finalise submission button + @javascript @_file_upload + Scenario: I upload a file and finalise it immediately + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I save and finalise the submission + And I visit the coursework page + Then I should see the file on the page + And I should not see the edit submission button + And I should not see the finalise submission button - @broken @javascript - Scenario: I upload a file and save it - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I save the submission - And I visit the coursework page - And I click on the finalise submission button - And I agree to the confirm message - Then I should be on the coursework page - And I should not see the finalise submission button + @broken @javascript @_file_upload + Scenario: I upload a file and save it + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I save the submission + And I visit the coursework page + And I click on the finalise submission button + And I agree to the confirm message + Then I should be on the coursework page + And I should not see the finalise submission button - @javascript - Scenario: I should not see the early finalisation button on the student page when the option is disabled - Given the coursework "allowearlyfinalisation" setting is "0" in the database - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I save the submission - And I visit the coursework page - Then I should not see the finalise button + @javascript @_file_upload + Scenario: I should not see the early finalisation button on the student page when the option is disabled + Given the coursework "allowearlyfinalisation" setting is "0" in the database + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I save the submission + And I visit the coursework page + Then I should not see the finalise button - Scenario: I should not see the early finalisation button on the student submission form - Given the coursework "allowearlyfinalisation" setting is "0" in the database - When I visit the coursework page - And I click on the new submission button - Then I should not see the save and finalise button \ No newline at end of file + Scenario: I should not see the early finalisation button on the student submission form + Given the coursework "allowearlyfinalisation" setting is "0" in the database + When I visit the coursework page + And I click on the new submission button + Then I should not see the save and finalise button diff --git a/tests/behat/submissions_file_upload_limit.feature b/tests/behat/submissions_file_upload_limit.feature index 50ae4ffb..38770dcf 100644 --- a/tests/behat/submissions_file_upload_limit.feature +++ b/tests/behat/submissions_file_upload_limit.feature @@ -5,18 +5,17 @@ Feature: File upload limits I want to be able to limit the number of files that a student can upload So that they must submit a specific number - Background: - Given there is a course - And there is a coursework - And I am logged in as a student + Background: + Given there is a course + And there is a coursework + And I am logged in as a student - @javascript - Scenario: I am prevented from uploading more files than specified - Given the coursework "maxfiles" setting is "2" in the database - - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager - Then the file upload button should not be visible + @javascript @_file_upload + Scenario: I am prevented from uploading more files than specified + Given the coursework "maxfiles" setting is "2" in the database + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager + Then the file upload button should not be visible diff --git a/tests/behat/submissions_file_upload_types.feature b/tests/behat/submissions_file_upload_types.feature index 04315233..061ba499 100644 --- a/tests/behat/submissions_file_upload_types.feature +++ b/tests/behat/submissions_file_upload_types.feature @@ -5,33 +5,33 @@ Feature: Restricting the types of files that students can upload I want to be able to restrict what file types the students can upload So that tutors marking the work have a consistent experence and don't waste time - Background: - Given there is a course - And there is a coursework - And I am logged in as a student + Background: + Given there is a course + And there is a coursework + And I am logged in as a student - @javascript - Scenario: I can upload anything when the settings are empty - Given the coursework "filetypes" setting is "" in the database + @javascript @_file_upload + Scenario: I can upload anything when the settings are empty + Given the coursework "filetypes" setting is "" in the database - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager - Then I should see "1" elements in "Upload a file" filemanager + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager + Then I should see "1" elements in "Upload a file" filemanager # Wrong file type throws an exception with a backtrace. Can't find out how to expect this. -# @javascript -# Scenario: I can not upload other file types when the settings are restrictive -# Given the coursework "filetypes" setting is "doc" in the database +# @javascript @_file_upload +# Scenario: I can not upload other file types when the settings are restrictive +# Given the coursework "filetypes" setting is "doc" in the database # -# When I visit the coursework page -# And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager -# Then I should see "0" elements in "Upload a file" filemanager +# When I visit the coursework page +# And I upload "mod/coursework/tests/files_for_uploading/Test_image.png" file to "Upload a file" filemanager +# Then I should see "0" elements in "Upload a file" filemanager - @javascript - Scenario: I can upload allowed file types when the settings are restrictive - Given the coursework "filetypes" setting is "docx" in the database - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - Then I should see "1" elements in "Upload a file" filemanager \ No newline at end of file + @javascript @_file_upload + Scenario: I can upload allowed file types when the settings are restrictive + Given the coursework "filetypes" setting is "docx" in the database + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + Then I should see "1" elements in "Upload a file" filemanager diff --git a/tests/behat/submissions_group_submissions.feature b/tests/behat/submissions_group_submissions.feature index 1e81afba..dc438526 100644 --- a/tests/behat/submissions_group_submissions.feature +++ b/tests/behat/submissions_group_submissions.feature @@ -5,44 +5,44 @@ Feature: Students are able to submit one piece of work on behalf of the group I want to be able to submit a single piece of work on behalf of the other people in my group So that they and the tutor can see it and mark it - Background: - Given there is a course - And there is a coursework - And the coursework "use_groups" setting is "1" in the database - And I am logged in as a student - And the student is a member of a group - And there is another student - And the other student is a member of the group + Background: + Given there is a course + And there is a coursework + And the coursework "use_groups" setting is "1" in the database + And I am logged in as a student + And the student is a member of a group + And there is another student + And the other student is a member of the group - @javascript - Scenario: I can submit a file and it appears for the others to see - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Submit" - And I log out - And I log in as the other student - And I visit the coursework page - Then I should see the file on the page + @javascript @_file_upload + Scenario: I can submit a file and it appears for the others to see + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Submit" + And I log out + And I log in as the other student + And I visit the coursework page + Then I should see the file on the page - @javascript - Scenario: I can resubmit the work when someone else has submitted it - Given the coursework "maxfiles" setting is "2" in the database - And I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Submit" - And I log out - And I log in as the other student - And I visit the coursework page - Then I should see that the submission was made by the student + @javascript @_file_upload + Scenario: I can resubmit the work when someone else has submitted it + Given the coursework "maxfiles" setting is "2" in the database + And I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Submit" + And I log out + And I log in as the other student + And I visit the coursework page + Then I should see that the submission was made by the student - When I click on the edit submission button - Then I should see "1" elements in "Upload a file" filemanager + When I click on the edit submission button + Then I should see "1" elements in "Upload a file" filemanager - When I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager + When I upload "mod/coursework/tests/files_for_uploading/Test_document_two.docx" file to "Upload a file" filemanager - And I press "Submit" - Then I should be on the coursework page - And I should see both the submission files on the page - And I should see that the submission was made by the other student + And I press "Submit" + Then I should be on the coursework page + And I should see both the submission files on the page + And I should see that the submission was made by the other student diff --git a/tests/behat/submissions_late_submissions.feature b/tests/behat/submissions_late_submissions.feature index 16d1fe76..f13ffb5c 100644 --- a/tests/behat/submissions_late_submissions.feature +++ b/tests/behat/submissions_late_submissions.feature @@ -1,29 +1,28 @@ +@mod @mod_coursework Feature: Late submissions As a teacher I want to be able to allow stuents to submit work past the deadline So that they can still get some credit even if their grades get capped - Background: - Given there is a course - And there is a coursework - And I am logged in as a student - - Scenario: not allowed to submit late if the setting does not allow it - Given the coursework "allowlatesubmissions" setting is "0" in the database - And the submission deadline has passed - When I visit the coursework page - Then I should not see the new submission button - - @javascript - Scenario: allowed to submit late if the setting allows it - Given the coursework "allowlatesubmissions" setting is "1" in the database - And the submission deadline has passed - When I visit the coursework page - Then I should see the new submission button - When I visit the new submission page - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I press "Submit" - Then I should be on the coursework page + Background: + Given there is a course + And there is a coursework + And I am logged in as a student + Scenario: not allowed to submit late if the setting does not allow it + Given the coursework "allowlatesubmissions" setting is "0" in the database + And the submission deadline has passed + When I visit the coursework page + Then I should not see the new submission button + @javascript @_file_upload + Scenario: allowed to submit late if the setting allows it + Given the coursework "allowlatesubmissions" setting is "1" in the database + And the submission deadline has passed + When I visit the coursework page + Then I should see the new submission button + When I visit the new submission page + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I press "Submit" + Then I should be on the coursework page diff --git a/tests/behat/submissions_start_date.feature b/tests/behat/submissions_start_date.feature index e8ca422d..2619ab90 100644 --- a/tests/behat/submissions_start_date.feature +++ b/tests/behat/submissions_start_date.feature @@ -1,27 +1,28 @@ +@mod @mod_coursework Feature: Start date As a teacher I want to be able to restrict the start date of the coursework So that students will not begin to work on it until the right time - Background: - Given there is a course - And there is a coursework + Background: + Given there is a course + And there is a coursework - Scenario: The student can submit when the start date is disabled - Given the coursework start date is disabled - When I log in as a student - And I visit the coursework page - Then I should see the new submission button + Scenario: The student can submit when the start date is disabled + Given the coursework start date is disabled + When I log in as a student + And I visit the coursework page + Then I should see the new submission button - Scenario: The student can not submit when the start date is in the future - Given the coursework start date is in the future - When I log in as a student - And I visit the coursework page - Then I should not see the new submission button + Scenario: The student can not submit when the start date is in the future + Given the coursework start date is in the future + When I log in as a student + And I visit the coursework page + Then I should not see the new submission button - Scenario: The student can submit when the start date is in the past - Given the coursework start date is in the past - When I log in as a student - And I visit the coursework page - Then I should see the new submission button \ No newline at end of file + Scenario: The student can submit when the start date is in the past + Given the coursework start date is in the past + When I log in as a student + And I visit the coursework page + Then I should see the new submission button diff --git a/tests/behat/submissions_student_submission.feature b/tests/behat/submissions_student_submission.feature index 01bcb082..963e5a1d 100644 --- a/tests/behat/submissions_student_submission.feature +++ b/tests/behat/submissions_student_submission.feature @@ -5,35 +5,29 @@ Feature: Students can submit files As a student who has completed some work I want to be able to upload it as a file to the coursework instance - Background: - Given there is a course - And there is a coursework - And I am logged in as a student - - @javascript - Scenario: I upload a file and see it on the coursework page as read only - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I save the submission - Then I should be on the coursework page - And I should see the file on the page - And I should see the edit submission button - - @javascript - Scenario: I upload a file and save it and I see it when I come back - When I visit the coursework page - And I click on the new submission button - And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager - And I save the submission - Then I should be on the coursework page - When I visit the course page - And I visit the coursework page - And I click on the edit submission button - Then I should see "1" elements in "Upload a file" filemanager - - - - - - + Background: + Given there is a course + And there is a coursework + And I am logged in as a student + + @javascript @_file_upload + Scenario: I upload a file and see it on the coursework page as read only + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I save the submission + Then I should be on the coursework page + And I should see the file on the page + And I should see the edit submission button + + @javascript @_file_upload + Scenario: I upload a file and save it and I see it when I come back + When I visit the coursework page + And I click on the new submission button + And I upload "mod/coursework/tests/files_for_uploading/Test_document.docx" file to "Upload a file" filemanager + And I save the submission + Then I should be on the coursework page + When I visit the course page + And I visit the coursework page + And I click on the edit submission button + Then I should see "1" elements in "Upload a file" filemanager diff --git a/tests/behat/submissions_submit_onbehalf_student.feature b/tests/behat/submissions_submit_onbehalf_student.feature index 8aee7f49..6922ed43 100644 --- a/tests/behat/submissions_submit_onbehalf_student.feature +++ b/tests/behat/submissions_submit_onbehalf_student.feature @@ -11,7 +11,7 @@ Feature: User can submit on behalf of a student And there is a student And I am logged in as a manager - @javascript + @javascript @_file_upload Scenario: As a teacher, I upload a file and see it on the coursework page as read only When I visit the coursework page And I click on the new submission button for the student diff --git a/tests/behat/warnings.feature b/tests/behat/warnings.feature index 3769f3ec..d13f3286 100644 --- a/tests/behat/warnings.feature +++ b/tests/behat/warnings.feature @@ -1,30 +1,31 @@ +@mod @mod_coursework@mod @mod_coursework Feature: warnings when settings are not right As a manager I want to know when there are issues with the setup of the coursework instance So that I can take corrective action before stuff goes wrong - Background: - Given there is a course - And there is a coursework + Background: + Given there is a course + And there is a coursework - Scenario: managers see a warning about there being too few teachers - Given there is a teacher - And the coursework "numberofmarkers" setting is "3" in the database - And I am logged in as a manager - When I visit the coursework page - Then I should see "There are only" + Scenario: managers see a warning about there being too few teachers + Given there is a teacher + And the coursework "numberofmarkers" setting is "3" in the database + And I am logged in as a manager + When I visit the coursework page + Then I should see "There are only" - Scenario: Teachers do not see the warnign about too few teachers - Given there is a teacher - And the coursework "numberofmarkers" setting is "3" in the database - And I am logged in as a teacher - When I visit the coursework page - Then I should not see "There are only" + Scenario: Teachers do not see the warning about too few teachers + Given there is a teacher + And the coursework "numberofmarkers" setting is "3" in the database + And I am logged in as a teacher + When I visit the coursework page + Then I should not see "There are only" - Scenario: There is no warning when there are enough teachers - Given there is a teacher - And the coursework "numberofmarkers" setting is "1" in the database - And I am logged in as a manager - When I visit the coursework page - Then I should not see "There are only" + Scenario: There is no warning when there are enough teachers + Given there is a teacher + And the coursework "numberofmarkers" setting is "1" in the database + And I am logged in as a manager + When I visit the coursework page + Then I should not see "There are only"