Browse Source

fix some spacing in test files.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
76ecd16c7f
  1. 183
      tests/behat/attendance_mod.feature
  2. 96
      tests/behat/preferences.feature
  3. 452
      tests/behat/report.feature

183
tests/behat/attendance_mod.feature

@ -1,101 +1,102 @@
@javascript @mod @uon @mod_attendance @javascript @mod @uon @mod_attendance
Feature: Teachers and Students can record session attendance Feature: Teachers and Students can record session attendance
In order to record session attendance In order to record session attendance
As a student As a student
I need to be able to mark my own attendance to a session I need to be able to mark my own attendance to a session
And as a teacher And as a teacher
I need to be able to mark any students attendance to a session I need to be able to mark any students attendance to a session
In order to report on session attendance In order to report on session attendance
As a teacher As a teacher
I need to be able to export session attendance and run reports I need to be able to export session attendance and run reports
In order to contact students with poor attendance In order to contact students with poor attendance
As a teacher As a teacher
I need the ability to message a group of students with low attendance I need the ability to message a group of students with low attendance
Background: Background:
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | summary | category | timecreated | timemodified | | fullname | shortname | summary | category | timecreated | timemodified |
| Course 1 | C1 | Prove the attendance activity works | 0 | ##yesterday## | ##yesterday## | | Course 1 | C1 | Prove the attendance activity works | 0 | ##yesterday## | ##yesterday## |
And the following "users" exist: And the following "users" exist:
| username | firstname | lastname | email | idnumber | department | institution | | username | firstname | lastname | email | idnumber | department | institution |
| student1 | Sam | Student | student1@asd.com | 1234 | computer science | University of Nottingham | | student1 | Sam | Student | student1@asd.com | 1234 | computer science | University of Nottingham |
| teacher1 | Teacher | One | teacher1@asd.com | 5678 | computer science | University of Nottingham | | teacher1 | Teacher | One | teacher1@asd.com | 5678 | computer science | University of Nottingham |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| course | user | role | timestart | | course | user | role | timestart |
| C1 | student1 | student | ##yesterday## | | C1 | student1 | student | ##yesterday## |
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I follow "Add a block" And I follow "Add a block"
And I follow "Administration" And I follow "Administration"
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance | | Name | Attendance |
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I should see "Attendance" And I should see "Attendance"
And I log out And I log out
Scenario: Students can mark their own attendance Scenario: Students can mark their own attendance
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Add" And I follow "Add"
And I set the field "Allow students to record own attendance" to "1" And I set the field "Allow students to record own attendance" to "1"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 22 | | id_sestime_starthour | 22 |
| id_sestime_endhour | 23 | | id_sestime_endhour | 23 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Submit attendance" And I follow "Submit attendance"
And I set the field "Present" to "1" And I set the field "Present" to "1"
And I press "Save changes" And I press "Save changes"
And I should see "Self-recorded" And I should see "Self-recorded"
And I log out And I log out
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I expand "Reports" node And I expand "Reports" node
And I follow "Logs" And I follow "Logs"
And I click on "Get these logs" "button" And I click on "Get these logs" "button"
Then "Attendance taken by student" "link" should exist Then "Attendance taken by student" "link" should exist
Scenario: Teachers can view low grade report and send a message Scenario: Teachers can view low grade report and send a message
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Add" And I follow "Add"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 01 | | id_sestime_starthour | 01 |
| id_sestime_endhour | 02 | | id_sestime_endhour | 02 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
And I follow "Report" And I follow "Report"
And I follow "Low grade" And I follow "Low grade"
And I set the field "cb_selector" to "1" And I set the field "cb_selector" to "1"
And I click on "Send a message" "button" And I click on "Send a message" "button"
And I should see "Message body" And I should see "Message body"
And I should see "student1@asd.com" And I should see "student1@asd.com"
And I follow "Course 1" And I follow "Course 1"
And I expand "Reports" node And I expand "Reports" node
And I follow "Logs" And I follow "Logs"
And I click on "Get these logs" "button" And I click on "Get these logs" "button"
Then "Attendance report viewed" "link" should exist Then "Attendance report viewed" "link" should exist
Scenario: Export report includes id number, department and institution Scenario: Export report includes id number, department and institution
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Add" And I follow "Add"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 01 | | id_sestime_starthour | 01 |
| id_sestime_endhour | 02 | | id_sestime_endhour | 02 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
And I follow "Export" And I follow "Export"
Then the field "id_ident_idnumber" matches value "" Then the field "id_ident_idnumber" matches value ""
And the field "id_ident_institution" matches value "" And the field "id_ident_institution" matches value ""
And the field "id_ident_department" matches value "" And the field "id_ident_department" matches value ""
# Removed dependency on behat_download to allow automated Travis CI tests to pass.
# It would be good to add these back at some point. # Removed dependency on behat_download to allow automated Travis CI tests to pass.
# It would be good to add these back at some point.

96
tests/behat/preferences.feature

@ -1,56 +1,56 @@
@mod @uon @mod_attendance @mod_attendance_preferences @mod @uon @mod_attendance @mod_attendance_preferences
Feature: Teachers can't change status variables to have empty acronyms or descriptions Feature: Teachers can't change status variables to have empty acronyms or descriptions
In order to update status variables In order to update status variables
As a teacher As a teacher
I need to see an error notice below each acronym / description that I try to set to be empty I need to see an error notice below each acronym / description that I try to set to be empty
Background: Background:
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | summary | category | timecreated | timemodified | | fullname | shortname | summary | category | timecreated | timemodified |
| Course 1 | C1 | Prove the attendance activity works | 0 | ##yesterday## | ##yesterday## | | Course 1 | C1 | Prove the attendance activity works | 0 | ##yesterday## | ##yesterday## |
And the following "users" exist: And the following "users" exist:
| username | firstname | lastname | | username | firstname | lastname |
| student1 | Sam | Student | | student1 | Sam | Student |
| teacher1 | Teacher | One | | teacher1 | Teacher | One |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| course | user | role | timestart | | course | user | role | timestart |
| C1 | student1 | student | ##yesterday## | | C1 | student1 | student | ##yesterday## |
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendancepreftest | | Name | Attendancepreftest |
And I follow "Attendancepreftest" And I follow "Attendancepreftest"
And I follow "Status set" And I follow "Status set"
@javascript @javascript
Scenario: Teachers can add status variables Scenario: Teachers can add status variables
# Set the second status acronym to be empty # Set the second status acronym to be empty
Given I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[2]/input" to "" Given I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[2]/input" to ""
# Set the second status description to be empty # Set the second status description to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[3]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[3]/input" to ""
# Set the second status grade to be empty # Set the second status grade to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[4]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[4]/input" to ""
When I click on "Update" "button" in the "#preferencesform" "css_element" When I click on "Update" "button" in the "#preferencesform" "css_element"
Then I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[2]/td[2]/p" "xpath_element" Then I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[2]/td[2]/p" "xpath_element"
And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[2]/td[3]/p" "xpath_element" And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[2]/td[3]/p" "xpath_element"
And I click on "Update" "button" in the "#preferencesform" "css_element" And I click on "Update" "button" in the "#preferencesform" "css_element"
# Set the first status acronym to be empty # Set the first status acronym to be empty
Given I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[1]/td[2]/input" to "" Given I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[1]/td[2]/input" to ""
# Set the first status description to be empty # Set the first status description to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[1]/td[3]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[1]/td[3]/input" to ""
# Set the first status grade to be empty # Set the first status grade to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[1]/td[4]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[1]/td[4]/input" to ""
# Set the third status acronym to be empty # Set the third status acronym to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[3]/td[2]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[3]/td[2]/input" to ""
# Set the third status description to be empty # Set the third status description to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[3]/td[3]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[3]/td[3]/input" to ""
# Set the third status grade to be empty # Set the third status grade to be empty
And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[3]/td[4]/input" to "" And I set the field with xpath "//*[@id='preferencesform']/table/tbody/tr[3]/td[4]/input" to ""
When I click on "Update" "button" in the "#preferencesform" "css_element" When I click on "Update" "button" in the "#preferencesform" "css_element"
Then I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[1]/td[2]/p" "xpath_element" Then I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[1]/td[2]/p" "xpath_element"
And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[1]/td[3]/p" "xpath_element" And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[1]/td[3]/p" "xpath_element"
And I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[2]/p" "xpath_element" And I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[2]/p" "xpath_element"
And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[3]/p" "xpath_element" And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[3]/p" "xpath_element"

452
tests/behat/report.feature

@ -1,241 +1,239 @@
@javascript @mod @uon @mod_attendance @javascript @mod @uon @mod_attendance
Feature: Visiting reports Feature: Visiting reports
As a teacher I visit the reports As a teacher I visit the reports
Background: Background:
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | summary | category | timecreated | timemodified | | fullname | shortname | summary | category | timecreated | timemodified |
| Course 1 | C1 | Prove the attendance activity works | 0 | ##yesterday## | ##yesterday## | | Course 1 | C1 | Prove the attendance activity works | 0 | ##yesterday## | ##yesterday## |
And the following "users" exist: And the following "users" exist:
| username | firstname | lastname | email | idnumber | department | institution | | username | firstname | lastname | email | idnumber | department | institution |
| student1 | Student | 1 | student1@asd.com | 1234 | computer science | University of Nottingham | | student1 | Student | 1 | student1@asd.com | 1234 | computer science | University of Nottingham |
| teacher1 | Teacher | 1 | teacher1@asd.com | 5678 | computer science | University of Nottingham | | teacher1 | Teacher | 1 | teacher1@asd.com | 5678 | computer science | University of Nottingham |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| course | user | role | timestart | | course | user | role | timestart |
| C1 | student1 | student | ##yesterday## | | C1 | student1 | student | ##yesterday## |
| C1 | teacher1 | editingteacher | ##yesterday## | | C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Attendance" to section "1" and I fill the form with: And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance | | Name | Attendance |
And I follow "Attendance" And I follow "Attendance"
And I follow "Add a block" And I follow "Add a block"
And I follow "Administration" And I follow "Administration"
And I follow "Add session" And I follow "Add session"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 01 | | id_sestime_starthour | 01 |
| id_sestime_endhour | 02 | | id_sestime_endhour | 02 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
And I log out
And I log out
Scenario: Teacher takes attendance Scenario: Teacher takes attendance
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Edit settings" And I follow "Edit settings"
Then I set the following fields to these values: Then I set the following fields to these values:
| id_grade_modgrade_type | Point | | id_grade_modgrade_type | Point |
| id_grade_modgrade_point | 50 | | id_grade_modgrade_point | 50 |
And I press "Save and display" And I press "Save and display"
When I follow "Report" When I follow "Report"
Then "0 / 0" "text" should exist in the "Student 1" "table_row" Then "0 / 0" "text" should exist in the "Student 1" "table_row"
And "0.0%" "text" should exist in the "Student 1" "table_row" And "0.0%" "text" should exist in the "Student 1" "table_row"
When I follow "Grades" in the user menu When I follow "Grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
And "-" "text" should exist in the "Student 1" "table_row" And "-" "text" should exist in the "Student 1" "table_row"
When I follow "Attendance" When I follow "Attendance"
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" Then I click on "Take attendance" "link" in the "1am - 2am" "table_row"
# Late # Late
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Report" When I follow "Report"
Then "1 / 2" "text" should exist in the "Student 1" "table_row" Then "1 / 2" "text" should exist in the "Student 1" "table_row"
And "50.0%" "text" should exist in the "Student 1" "table_row" And "50.0%" "text" should exist in the "Student 1" "table_row"
When I follow "Grades" in the user menu When I follow "Grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
And "25.00" "text" should exist in the "Student 1" "table_row" And "25.00" "text" should exist in the "Student 1" "table_row"
And I log out And I log out
Scenario: Teacher changes the maximum points in the attendance settings Scenario: Teacher changes the maximum points in the attendance settings
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Edit settings" And I follow "Edit settings"
Then I set the following fields to these values: Then I set the following fields to these values:
| id_grade_modgrade_type | Point | | id_grade_modgrade_type | Point |
| id_grade_modgrade_point | 50 | | id_grade_modgrade_point | 50 |
And I press "Save and display" And I press "Save and display"
When I follow "Attendance" When I follow "Attendance"
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" Then I click on "Take attendance" "link" in the "1am - 2am" "table_row"
# Excused # Excused
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Attendance" When I follow "Attendance"
And I follow "Edit settings" And I follow "Edit settings"
Then I set the following fields to these values: Then I set the following fields to these values:
| id_grade_modgrade_type | Point | | id_grade_modgrade_type | Point |
| id_grade_modgrade_point | 70 | | id_grade_modgrade_point | 70 |
And I press "Save and display" And I press "Save and display"
When I follow "Report" When I follow "Report"
Then "1 / 2" "text" should exist in the "Student 1" "table_row" Then "1 / 2" "text" should exist in the "Student 1" "table_row"
And "50.0%" "text" should exist in the "Student 1" "table_row" And "50.0%" "text" should exist in the "Student 1" "table_row"
When I follow "Grades" in the user menu When I follow "Grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
Then "35.00" "text" should exist in the "Student 1" "table_row" Then "35.00" "text" should exist in the "Student 1" "table_row"
And I log out
And I log out
Scenario: Teacher take attendance of group session Scenario: Teacher take attendance of group session
Given the following "groups" exist: Given the following "groups" exist:
| course | name | idnumber | | course | name | idnumber |
| C1 | Group1 | Group1 | | C1 | Group1 | Group1 |
And the following "group members" exist: And the following "group members" exist:
| group | user | | group | user |
| Group1 | student1 | | Group1 | student1 |
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Edit settings" And I follow "Edit settings"
And I set the following fields to these values: And I set the following fields to these values:
| id_grade_modgrade_type | Point | | id_grade_modgrade_type | Point |
| id_grade_modgrade_point | 50 | | id_grade_modgrade_point | 50 |
| id_groupmode | Visible groups | | id_groupmode | Visible groups |
And I press "Save and display" And I press "Save and display"
When I follow "Attendance" When I follow "Attendance"
Then I click on "Take attendance" "link" in the "1am - 2am" "table_row" Then I click on "Take attendance" "link" in the "1am - 2am" "table_row"
# Excused # Excused
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Add session" When I follow "Add session"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 03 | | id_sestime_starthour | 03 |
| id_sestime_endhour | 04 | | id_sestime_endhour | 04 |
| id_sessiontype_1 | 1 | | id_sessiontype_1 | 1 |
| id_groups | Group1 | | id_groups | Group1 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
Then I should see "3am - 4am" Then I should see "3am - 4am"
And "Group: Group1" "text" should exist in the "3am - 4am" "table_row" And "Group: Group1" "text" should exist in the "3am - 4am" "table_row"
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" When I click on "Take attendance" "link" in the "3am - 4am" "table_row"
# Present # Present
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Report" When I follow "Report"
Then "3 / 4" "text" should exist in the "Student 1" "table_row" Then "3 / 4" "text" should exist in the "Student 1" "table_row"
And "75.0%" "text" should exist in the "Student 1" "table_row" And "75.0%" "text" should exist in the "Student 1" "table_row"
When I follow "Grades" in the user menu When I follow "Grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
Then "37.50" "text" should exist in the "Student 1" "table_row" Then "37.50" "text" should exist in the "Student 1" "table_row"
And I log out And I log out
Scenario: Teacher visit summary report Scenario: Teacher visit summary report
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Edit settings" And I follow "Edit settings"
And I set the following fields to these values: And I set the following fields to these values:
| id_grade_modgrade_type | Point | | id_grade_modgrade_type | Point |
| id_grade_modgrade_point | 50 | | id_grade_modgrade_point | 50 |
And I press "Save and display" And I press "Save and display"
When I click on "Take attendance" "link" in the "1am - 2am" "table_row" When I click on "Take attendance" "link" in the "1am - 2am" "table_row"
# Late # Late
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Add session" When I follow "Add session"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 03 | | id_sestime_starthour | 03 |
| id_sestime_endhour | 04 | | id_sestime_endhour | 04 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
Then I should see "3am - 4am" Then I should see "3am - 4am"
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" When I click on "Take attendance" "link" in the "3am - 4am" "table_row"
# Present # Present
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Add session" When I follow "Add session"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 05 | | id_sestime_starthour | 05 |
| id_sestime_endhour | 06 | | id_sestime_endhour | 06 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
Then I should see "5am - 6am" Then I should see "5am - 6am"
When I follow "Report" When I follow "Report"
And I click on "Summary" "link" in the "All" "table_row" And I click on "Summary" "link" in the "All" "table_row"
Then "3 / 6" "text" should exist in the "Student 1" "table_row" Then "3 / 6" "text" should exist in the "Student 1" "table_row"
And "50.0%" "text" should exist in the "Student 1" "table_row" And "50.0%" "text" should exist in the "Student 1" "table_row"
And "5 / 6" "text" should exist in the "Student 1" "table_row" And "5 / 6" "text" should exist in the "Student 1" "table_row"
And "83.3%" "text" should exist in the "Student 1" "table_row" And "83.3%" "text" should exist in the "Student 1" "table_row"
And I log out And I log out
Scenario: Student visit user report Scenario: Student visit user report
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "Edit settings" And I follow "Edit settings"
Then I set the following fields to these values: Then I set the following fields to these values:
| id_grade_modgrade_type | Point | | id_grade_modgrade_type | Point |
| id_grade_modgrade_point | 50 | | id_grade_modgrade_point | 50 |
And I press "Save and display" And I press "Save and display"
When I click on "Take attendance" "link" in the "1am - 2am" "table_row" When I click on "Take attendance" "link" in the "1am - 2am" "table_row"
# Late # Late
And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c4 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Add session" When I follow "Add session"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 03 | | id_sestime_starthour | 03 |
| id_sestime_endhour | 04 | | id_sestime_endhour | 04 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
When I click on "Take attendance" "link" in the "3am - 4am" "table_row" When I click on "Take attendance" "link" in the "3am - 4am" "table_row"
# Present # Present
And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row" And I click on "td.cell.c3 input" "css_element" in the "Student 1" "table_row"
And I press "Save attendance" And I press "Save attendance"
When I follow "Add session" When I follow "Add session"
And I set the following fields to these values: And I set the following fields to these values:
| id_sestime_starthour | 05 | | id_sestime_starthour | 05 |
| id_sestime_endhour | 06 | | id_sestime_endhour | 06 |
And I click on "id_submitbutton" "button" And I click on "id_submitbutton" "button"
Then I log out Then I log out
When I log in as "student1" When I log in as "student1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Attendance" And I follow "Attendance"
And I follow "All" And I follow "All"
Then "2" "text" should exist in the "Taken sessions" "table_row" Then "2" "text" should exist in the "Taken sessions" "table_row"
And "3 / 4" "text" should exist in the "Points over taken sessions:" "table_row" And "3 / 4" "text" should exist in the "Points over taken sessions:" "table_row"
And "75.0%" "text" should exist in the "Percentage over taken sessions:" "table_row" And "75.0%" "text" should exist in the "Percentage over taken sessions:" "table_row"
And "3" "text" should exist in the "Total number of sessions:" "table_row" And "3" "text" should exist in the "Total number of sessions:" "table_row"
And "3 / 6" "text" should exist in the "Points over all sessions:" "table_row" And "3 / 6" "text" should exist in the "Points over all sessions:" "table_row"
And "50.0%" "text" should exist in the "Percentage over all sessions:" "table_row" And "50.0%" "text" should exist in the "Percentage over all sessions:" "table_row"
And "5 / 6" "text" should exist in the "Maximum possible points:" "table_row" And "5 / 6" "text" should exist in the "Maximum possible points:" "table_row"
And "83.3%" "text" should exist in the "Maximum possible percentage:" "table_row" And "83.3%" "text" should exist in the "Maximum possible percentage:" "table_row"
And I log out And I log out
Loading…
Cancel
Save