MDL-38805 behat: New test
[moodle.git] / completion / tests / behat / enable_manual_complete_mark.feature
CommitLineData
abc38a97
DM
1@core_completion
2Feature: Allow students to manually mark an activity as complete
3 In order to let students decide when an activity is completed
4 As a moodle teacher
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
28 And I follow "Edit settings"
29 And I fill the moodle form with:
30 | Completion tracking | Enabled, control via completion and activity settings |
31 | Completion tracking begins on enrolment | 1 |
32 And I press "Save changes"
33 When I add a "Forum" to section "1" and I fill the form with:
34 | Forum name | Test forum name |
35 | Description | Test forum description |
36 Then "Student First" user has not completed "Test forum name" activity
37 And I log out
38 And I log in as "student1"
39 And I follow "Course 1"
40 And I press "Mark as complete: Test forum name"
41 And I wait "3" seconds
42 And I log out
43 And I log in as "teacher1"
44 And I follow "Course 1"
45 And I expand "Reports" node
46 And I follow "Activity completion"
47 And "Student First" user has completed "Test forum name" activity