1 |
efrain |
1 |
@ewallah @availability @availability_coursecompleted
|
|
|
2 |
Feature: Section 0 availability_coursecompleted
|
|
|
3 |
Section 0 cannot be restricted
|
|
|
4 |
|
|
|
5 |
Background:
|
|
|
6 |
Given the following "courses" exist:
|
|
|
7 |
| fullname | shortname | category | enablecompletion |
|
|
|
8 |
| Course 1 | C1 | 0 | 1 |
|
|
|
9 |
And the following "users" exist:
|
|
|
10 |
| username |
|
|
|
11 |
| teacher1 |
|
|
|
12 |
And the following "course enrolments" exist:
|
|
|
13 |
| user | course | role |
|
|
|
14 |
| teacher1 | C1 | editingteacher |
|
|
|
15 |
|
|
|
16 |
@javascript
|
|
|
17 |
Scenario: Restrict section0 on completing course
|
|
|
18 |
When I log in as "admin"
|
|
|
19 |
And I am on "Course 1" course homepage
|
|
|
20 |
And I navigate to "Course completion" in current page administration
|
|
|
21 |
And I expand all fieldsets
|
|
|
22 |
And I set the field "Teacher" to "1"
|
|
|
23 |
And I press "Save changes"
|
|
|
24 |
And I turn editing mode on
|
|
|
25 |
And I edit the section "0"
|
|
|
26 |
And I expand all fieldsets
|
|
|
27 |
And I click on "Add restriction..." "button"
|
|
|
28 |
Then "Course completed" "button" should exist in the "Add restriction..." "dialogue"
|
|
|
29 |
|
|
|
30 |
@javascript
|
|
|
31 |
Scenario: Section0 cannot be restricted without criteria
|
|
|
32 |
When I log in as "admin"
|
|
|
33 |
And I am on "Course 1" course homepage
|
|
|
34 |
And I turn editing mode on
|
|
|
35 |
And I edit the section "0"
|
|
|
36 |
And I expand all fieldsets
|
|
|
37 |
And I click on "Add restriction..." "button"
|
|
|
38 |
Then "Course completed" "button" should not exist in the "Add restriction..." "dialogue"
|