MDL-42625 behat: Editing .feature files
[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
9 Given the following "courses" exists:
10 | fullname | shortname | category |
11 | Course 1 | C1 | 0 |
12 And the following "users" exists:
13 | username | firstname | lastname | email |
14 | teacher1 | Teacher | Frist | teacher1@asd.com |
15 | student1 | Student | First | student1@asd.com |
16 And the following "course enrolments" exists:
17 | user | course | role |
18 | teacher1 | C1 | editingteacher |
19 | student1 | C1 | student |
20 And I log in as "admin"
21 And I set the following administration settings values:
22 | Enable completion tracking | 1 |
23 | Enable conditional access | 1 |
24 And I log out
25 And I log in as "teacher1"
26 And I follow "Course 1"
27 And I turn editing mode on
047a8800 28 And I click on "Edit settings" "link" in the "Administration" "block"
abc38a97 29 And I fill the moodle form with:
5bc7cd92 30 | Enable completion tracking | Yes |
abc38a97
DM
31 And I press "Save changes"
32 When I add a "Forum" to section "1" and I fill the form with:
33 | Forum name | Test forum name |
34 | Description | Test forum description |
35 Then "Student First" user has not completed "Test forum name" activity
36 And I log out
37 And I log in as "student1"
38 And I follow "Course 1"
39 And I press "Mark as complete: Test forum name"
abc38a97
DM
40 And I log out
41 And I log in as "teacher1"
42 And I follow "Course 1"
43 And I expand "Reports" node
44 And I follow "Activity completion"
45 And "Student First" user has completed "Test forum name" activity