Merge branch 'MDL-53140-master' of git://github.com/rezaies/moodle
[moodle.git] / completion / tests / behat / enable_manual_complete_mark.feature
CommitLineData
550d842e 1@core @core_completion
abc38a97
DM
2Feature: Allow students to manually mark an activity as complete
3 In order to let students decide when an activity is completed
5d7b6307 4 As a teacher
abc38a97
DM
5 I need to allow students to mark activities as completed
6
7 @javascript
8 Scenario: Mark an activity as completed
759b323e 9 Given the following "courses" exist:
abc38a97
DM
10 | fullname | shortname | category |
11 | Course 1 | C1 | 0 |
759b323e 12 And the following "users" exist:
abc38a97 13 | username | firstname | lastname | email |
0fe86bbd
RT
14 | teacher1 | Teacher | Frist | teacher1@example.com |
15 | student1 | Student | First | student1@example.com |
759b323e 16 And the following "course enrolments" exist:
abc38a97
DM
17 | user | course | role |
18 | teacher1 | C1 | editingteacher |
19 | student1 | C1 | student |
abc38a97 20 And I log in as "teacher1"
fdeeaff9 21 And I am on "Course 1" course homepage with editing mode on
e5287f9b 22 And I navigate to "Edit settings" in current page administration
f083d614 23 And I set the following fields to these values:
5bc7cd92 24 | Enable completion tracking | Yes |
38ea5e0a 25 And I press "Save and display"
3982685a 26 And I add a "Forum" to section "1" and I fill the form with:
2c1a1b15
JP
27 | Forum name | Test forum name |
28 | Description | Test forum description |
29 | Completion tracking | Students can manually mark the activity as completed |
3982685a 30 And "Student First" user has not completed "Test forum name" activity
abc38a97
DM
31 And I log out
32 And I log in as "student1"
fdeeaff9 33 And I am on "Course 1" course homepage
8857c715 34 When I click on "Not completed: Test forum name. Select to mark as complete." "icon"
3982685a 35 Then the "Test forum name" "forum" activity with "manual" completion should be marked as complete
abc38a97
DM
36 And I log out
37 And I log in as "teacher1"
fdeeaff9 38 And I am on "Course 1" course homepage
abc38a97 39 And "Student First" user has completed "Test forum name" activity