Browse Source

MDL-58265 replace I follow, editing mode steps

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
492da49606
  1. 1
      renderer.php
  2. 15
      tests/behat/attendance_mod.feature
  3. 7
      tests/behat/calendar_features.feature
  4. 3
      tests/behat/defaultstatus.feature
  5. 13
      tests/behat/extra_features.feature
  6. 3
      tests/behat/preferences.feature
  7. 15
      tests/behat/report.feature

1
renderer.php

@ -986,7 +986,6 @@ class mod_attendance_renderer extends plugin_renderer_base {
$rows[] = $row;
foreach ($reportdata->users as $user) {
$row = new html_table_row();
$row->cells[] = $this->build_data_cell($this->user_picture($user));

15
tests/behat/attendance_mod.feature

@ -26,21 +26,20 @@ Feature: Teachers and Students can record session attendance
| C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I follow "Add a block"
And I follow "Administration"
And I add a "Attendance" to section "1" and I fill the form with:
| Name | Attendance |
And I log out
And I log in as "student1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I should see "Attendance"
And I log out
Scenario: Students can mark their own attendance
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Add"
And I set the field "Allow students to record own attendance" to "1"
@ -50,7 +49,7 @@ Feature: Teachers and Students can record session attendance
And I click on "id_submitbutton" "button"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Submit attendance"
And I set the field "Present" to "1"
@ -58,7 +57,7 @@ Feature: Teachers and Students can record session attendance
And I should see "Self-recorded"
And I log out
When I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I expand "Reports" node
And I follow "Logs"
And I click on "Get these logs" "button"
@ -66,7 +65,7 @@ Feature: Teachers and Students can record session attendance
Scenario: Teachers can view low grade report and send a message
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Add"
And I set the following fields to these values:
@ -87,7 +86,7 @@ Feature: Teachers and Students can record session attendance
Scenario: Export report includes id number, department and institution
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Add"
And I set the following fields to these values:

7
tests/behat/calendar_features.feature

@ -15,8 +15,7 @@ Feature: Test the calendar related features in the attendance module
| C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add the "Upcoming events" block
And I add a "Attendance" to section "1" and I fill the form with:
| Name | Test attendance |
@ -24,14 +23,14 @@ Feature: Test the calendar related features in the attendance module
Scenario: Calendar events can be created automatically with sessions creation
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test attendance"
And I follow "Add session"
And I set the following fields to these values:
| id_sestime_starthour | 01 |
| id_sestime_endhour | 02 |
And I click on "id_submitbutton" "button"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Go to calendar"
And I should see "Test attendance"
And I log out

3
tests/behat/defaultstatus.feature

@ -22,8 +22,7 @@ Feature: Admin can set default status set for use in new attendance
@javascript
Scenario: Modified default status set added to new attendance
Given I log in as "teacher1"
And I follow "Course 1"
And I turn 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:
| Name | Attendance1 |
And I follow "Attendance1"

13
tests/behat/extra_features.feature

@ -21,15 +21,14 @@ Feature: Test the various new features in the attendance module
| C1 | student3 | student | ##yesterday## |
And I log in as "teacher1"
And I follow "Course 1"
And I turn 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:
| Name | Test attendance |
And I log out
Scenario: A teacher can create and update temporary users
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test attendance"
And I follow "Temporary users"
@ -61,7 +60,7 @@ Feature: Test the various new features in the attendance module
Scenario: A teacher can take attendance for temporary users
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test attendance"
And I follow "Temporary users"
And I set the following fields to these values:
@ -124,7 +123,7 @@ Feature: Test the various new features in the attendance module
| Group2 | student3 |
And I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test attendance"
And I follow "Add"
And I set the following fields to these values:
@ -147,7 +146,7 @@ Feature: Test the various new features in the attendance module
Scenario: A teacher can create and use multiple status lists
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test attendance"
And I follow "Status set"
And I set the field "jump" to "New set of statuses"
@ -196,7 +195,7 @@ Feature: Test the various new features in the attendance module
Scenario: A teacher can use the radio buttons to set attendance values for all users
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test attendance"
And I follow "Add"
And I set the following fields to these values:

3
tests/behat/preferences.feature

@ -18,8 +18,7 @@ Feature: Teachers can't change status variables to have empty acronyms or descri
| C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1"
And I follow "Course 1"
And I turn 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:
| Name | Attendancepreftest |
And I follow "Attendancepreftest"

15
tests/behat/report.feature

@ -16,8 +16,7 @@ Feature: Visiting reports
| C1 | teacher1 | editingteacher | ##yesterday## |
And I log in as "teacher1"
And I follow "Course 1"
And I turn 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:
| Name | Attendance |
And I follow "Attendance"
@ -33,7 +32,7 @@ Feature: Visiting reports
Scenario: Teacher takes attendance
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Edit settings"
Then I set the following fields to these values:
@ -67,7 +66,7 @@ Feature: Visiting reports
Scenario: Teacher changes the maximum points in the attendance settings
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Edit settings"
Then I set the following fields to these values:
@ -107,7 +106,7 @@ Feature: Visiting reports
| Group1 | student1 |
When I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Edit settings"
And I set the following fields to these values:
@ -149,7 +148,7 @@ Feature: Visiting reports
Scenario: Teacher visit summary report
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Edit settings"
And I set the following fields to these values:
@ -193,7 +192,7 @@ Feature: Visiting reports
Scenario: Student visit user report
Given I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "Edit settings"
Then I set the following fields to these values:
@ -226,7 +225,7 @@ Feature: Visiting reports
Then I log out
When I log in as "student1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Attendance"
And I follow "All"

Loading…
Cancel
Save