Browse Source

tidy up tests a little.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
0ee109766c
  1. 16
      tests/behat/attendance_mod.feature
  2. 4
      tests/behat/calendar_features.feature
  3. 2
      tests/behat/defaultstatus.feature
  4. 8
      tests/behat/report.feature

16
tests/behat/attendance_mod.feature

@ -25,7 +25,7 @@ Feature: Teachers and Students can record session attendance
| C1 | student1 | student | ##yesterday## |
| C1 | teacher1 | editingteacher | ##yesterday## |
When I log in as "teacher1"
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I follow "Add a block"
@ -35,11 +35,11 @@ Feature: Teachers and Students can record session attendance
And I log out
And I log in as "student1"
And I follow "Course 1"
Then I should see "Attendance"
And I should see "Attendance"
And I log out
Scenario: Students can mark their own attendance
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Add"
@ -49,13 +49,13 @@ Feature: Teachers and Students can record session attendance
| id_sestime_endhour | 23 |
And I click on "id_submitbutton" "button"
And I log out
When I log in as "student1"
And I log in as "student1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Submit attendance"
And I set the field "Present" to "1"
And I press "Save changes"
Then I should see "Self-recorded"
And I should see "Self-recorded"
And I log out
When I log in as "teacher1"
And I follow "Course 1"
@ -65,7 +65,7 @@ Feature: Teachers and Students can record session attendance
Then "Attendance taken by student" "link" should exist
Scenario: Teachers can view low grade report and send a message
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Add"
@ -77,7 +77,7 @@ Feature: Teachers and Students can record session attendance
And I follow "Low grade"
And I set the field "cb_selector" to "1"
And I click on "Send a message" "button"
Then I should see "Message body"
And I should see "Message body"
And I should see "student1@asd.com"
And I follow "Course 1"
And I expand "Reports" node
@ -86,7 +86,7 @@ Feature: Teachers and Students can record session attendance
Then "Attendance report viewed" "link" should exist
Scenario: Export report includes id number, department and institution
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Add"

4
tests/behat/calendar_features.feature

@ -23,7 +23,7 @@ Feature: Test the calendar related features in the attendance module
And I log out
Scenario: Calendar events can be created automatically with sessions creation
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Test attendance"
And I follow "Add session"
@ -33,7 +33,7 @@ Feature: Test the calendar related features in the attendance module
And I click on "id_submitbutton" "button"
And I follow "Course 1"
And I follow "Go to calendar"
Then I should see "Test attendance"
And I should see "Test attendance"
And I log out
And I log in as "student1"
And I follow "Go to calendar"

2
tests/behat/defaultstatus.feature

@ -21,7 +21,7 @@ Feature: Admin can set default status set for use in new attendance
@javascript
Scenario: Modified default status set added to new attendance
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Attendance" to section "1" and I fill the form with:

8
tests/behat/report.feature

@ -32,7 +32,7 @@ Feature: Visiting reports
And I log out
Scenario: Teacher takes attendance
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Edit settings"
@ -66,7 +66,7 @@ Feature: Visiting reports
And I log out
Scenario: Teacher changes the maximum points in the attendance settings
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Edit settings"
@ -148,7 +148,7 @@ Feature: Visiting reports
And I log out
Scenario: Teacher visit summary report
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Edit settings"
@ -192,7 +192,7 @@ Feature: Visiting reports
And I log out
Scenario: Student visit user report
When I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Attendance"
And I follow "Edit settings"

Loading…
Cancel
Save