Skip to content

Commit

Permalink
Merge pull request #11 from ucl-isd/CTP-3560-Coursework-behat-test-in…
Browse files Browse the repository at this point in the history
…dentation

CTP-3560 behat indentation
  • Loading branch information
aspark21 authored Sep 9, 2024
2 parents c56ae66 + bf95d97 commit 5476e3c
Show file tree
Hide file tree
Showing 47 changed files with 1,237 additions and 1,336 deletions.
26 changes: 13 additions & 13 deletions tests/behat/allocation_automatic_allocations_disabled.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
59 changes: 27 additions & 32 deletions tests/behat/allocation_automatic_equal_assessor_allocations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
88 changes: 44 additions & 44 deletions tests/behat/allocation_manual_assessor_allocations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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








40 changes: 20 additions & 20 deletions tests/behat/allocation_visibility_of_allocated_students.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Loading

0 comments on commit 5476e3c

Please sign in to comment.