1 |
efrain |
1 |
@core @core_files
|
|
|
2 |
Feature: Course files
|
|
|
3 |
In order to add legacy files
|
|
|
4 |
As a user
|
|
|
5 |
I need to upload files
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: Add legacy files
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category | legacyfiles |
|
|
|
11 |
| Course 1 | C1 | 0 | 2 |
|
|
|
12 |
And the following config values are set as admin:
|
|
|
13 |
| legacyfilesinnewcourses | 1 |
|
|
|
14 |
| legacyfilesaddallowed | 1 |
|
|
|
15 |
When I log in as "admin"
|
|
|
16 |
And I am on "Course 1" course homepage
|
|
|
17 |
Then I navigate to "Legacy course files" in current page administration
|
|
|
18 |
And I press "Edit legacy course files"
|
|
|
19 |
And "Add..." "link" should be visible
|
|
|
20 |
And "Create folder" "link" should be visible
|
|
|
21 |
|
|
|
22 |
@javascript
|
|
|
23 |
Scenario: Add legacy file disabled
|
|
|
24 |
Given the following "courses" exist:
|
|
|
25 |
| fullname | shortname | category | legacyfiles |
|
|
|
26 |
| Course 1 | C1 | 0 | 2 |
|
|
|
27 |
And the following config values are set as admin:
|
|
|
28 |
| legacyfilesinnewcourses | 1 |
|
|
|
29 |
| legacyfilesaddallowed | 0 |
|
|
|
30 |
When I log in as "admin"
|
|
|
31 |
And I am on "Course 1" course homepage
|
|
|
32 |
Then I navigate to "Legacy course files" in current page administration
|
|
|
33 |
And I press "Edit legacy course files"
|
|
|
34 |
And "Add..." "link" should not be visible
|
|
|
35 |
And "Create folder" "link" should not be visible
|