Merge branch 'MDL-64032-master-fix' of https://github.com/andrewnicols/moodle

This commit is contained in:
Jun Pataleta 2019-08-08 10:23:10 +08:00
commit 07d00f0548

View File

@ -179,46 +179,47 @@ Feature: Teacher can search and enrol users one by one into the course
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row"
Then I should see "student100@example.com, 1234567892, 1234567893, ABC1, ABC2"
@javascript
Scenario: Enrol user from participants page
Given I navigate to course participants
# Enrol user to course
And I press "Enrol users"
And I set the field "Select users" to "example.com"
And I expand the "Select users" autocomplete
When I click on "Student 099" item in the autocomplete list
Then I should see "Student 099" in the list of options for the "Select users" autocomplete
And I click on "Show more" "button"
# Fill data to input duration
And "input[name='timeend[enabled]'][checked=checked]" "css_element" should not exist
And the "Enrolment duration" "select" should be enabled
And I set the field "duration" to "2"
# Fill data to input end time
And I set the field "Starting from" to "2"
And I set the field "timeend[enabled]" to "1"
And I set the field "timeend[day]" to "10"
And the "Enrolment duration" "select" should be disabled
And I click on "Enrol users" "button" in the "Enrol users" "dialogue"
And I am on "Course 001" course homepage
And I navigate to course participants
And I should see "Student 099" in the "participants" "table"
And I click on "Edit enrolment" "icon" in the "Student 099" "table_row"
And the field "timeend[day]" matches value "10"
@javascript
Scenario: Update Enrol user
Given I am on "Course 001" course homepage
And I navigate to course participants
When I click on "Edit enrolment" "icon" in the "Teacher 001" "table_row"
Then the "Enrolment duration" "select" should be enabled
# Fill duration
And "input[name='timeend[enabled]'][checked=checked]" "css_element" should not exist
And the "Enrolment duration" "select" should be enabled
And I set the field "duration" to "2"
# Fill end time
And I set the field "timeend[enabled]" to "1"
And I set the field "timeend[day]" to "28"
And the "Enrolment duration" "select" should be disabled
And I press "Save changes"
And I click on "Edit enrolment" "icon" in the "Teacher 001" "table_row"
And the field "timeend[day]" matches value "28"
# The following tests are commented out as a result of MDL-66339.
# @javascript
# Scenario: Enrol user from participants page
# Given I navigate to course participants
# # Enrol user to course
# And I press "Enrol users"
# And I set the field "Select users" to "example.com"
# And I expand the "Select users" autocomplete
# When I click on "Student 099" item in the autocomplete list
# Then I should see "Student 099" in the list of options for the "Select users" autocomplete
# And I click on "Show more" "button"
# # Fill data to input duration
# And "input[name='timeend[enabled]'][checked=checked]" "css_element" should not exist
# And the "Enrolment duration" "select" should be enabled
# And I set the field "duration" to "2"
# # Fill data to input end time
# And I set the field "Starting from" to "2"
# And I set the field "timeend[enabled]" to "1"
# And I set the field "timeend[day]" to "10"
# And the "Enrolment duration" "select" should be disabled
# And I click on "Enrol users" "button" in the "Enrol users" "dialogue"
# And I am on "Course 001" course homepage
# And I navigate to course participants
# And I should see "Student 099" in the "participants" "table"
# And I click on "Edit enrolment" "icon" in the "Student 099" "table_row"
# And the field "timeend[day]" matches value "10"
#
# @javascript
# Scenario: Update Enrol user
# Given I am on "Course 001" course homepage
# And I navigate to course participants
# When I click on "Edit enrolment" "icon" in the "Teacher 001" "table_row"
# Then the "Enrolment duration" "select" should be enabled
# # Fill duration
# And "input[name='timeend[enabled]'][checked=checked]" "css_element" should not exist
# And the "Enrolment duration" "select" should be enabled
# And I set the field "duration" to "2"
# # Fill end time
# And I set the field "timeend[enabled]" to "1"
# And I set the field "timeend[day]" to "28"
# And the "Enrolment duration" "select" should be disabled
# And I press "Save changes"
# And I click on "Edit enrolment" "icon" in the "Teacher 001" "table_row"
# And the field "timeend[day]" matches value "28"