mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-38805 behat: New test
According to MDLQA-511, a teacher can enable students to manually mark an activity as complete.
This commit is contained in:
parent
3a4d76ac3d
commit
abc38a9738
1 changed files with 47 additions and 0 deletions
47
completion/tests/behat/enable_manual_complete_mark.feature
Normal file
47
completion/tests/behat/enable_manual_complete_mark.feature
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
@core_completion
|
||||||
|
Feature: Allow students to manually mark an activity as complete
|
||||||
|
In order to let students decide when an activity is completed
|
||||||
|
As a moodle teacher
|
||||||
|
I need to allow students to mark activities as completed
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: Mark an activity as completed
|
||||||
|
Given the following "courses" exists:
|
||||||
|
| fullname | shortname | category |
|
||||||
|
| Course 1 | C1 | 0 |
|
||||||
|
And the following "users" exists:
|
||||||
|
| username | firstname | lastname | email |
|
||||||
|
| teacher1 | Teacher | Frist | teacher1@asd.com |
|
||||||
|
| student1 | Student | First | student1@asd.com |
|
||||||
|
And the following "course enrolments" exists:
|
||||||
|
| user | course | role |
|
||||||
|
| teacher1 | C1 | editingteacher |
|
||||||
|
| student1 | C1 | student |
|
||||||
|
And I log in as "admin"
|
||||||
|
And I set the following administration settings values:
|
||||||
|
| Enable completion tracking | 1 |
|
||||||
|
| Enable conditional access | 1 |
|
||||||
|
And I log out
|
||||||
|
And I log in as "teacher1"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I turn editing mode on
|
||||||
|
And I follow "Edit settings"
|
||||||
|
And I fill the moodle form with:
|
||||||
|
| Completion tracking | Enabled, control via completion and activity settings |
|
||||||
|
| Completion tracking begins on enrolment | 1 |
|
||||||
|
And I press "Save changes"
|
||||||
|
When I add a "Forum" to section "1" and I fill the form with:
|
||||||
|
| Forum name | Test forum name |
|
||||||
|
| Description | Test forum description |
|
||||||
|
Then "Student First" user has not completed "Test forum name" activity
|
||||||
|
And I log out
|
||||||
|
And I log in as "student1"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I press "Mark as complete: Test forum name"
|
||||||
|
And I wait "3" seconds
|
||||||
|
And I log out
|
||||||
|
And I log in as "teacher1"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I expand "Reports" node
|
||||||
|
And I follow "Activity completion"
|
||||||
|
And "Student First" user has completed "Test forum name" activity
|
Loading…
Add table
Add a link
Reference in a new issue