MDL-41940 files Option to limit legacy course files
[moodle.git] / files / tests / behat / course_files.feature
CommitLineData
cc0bb815
EM
1@files @files_course @_only_local
2Feature: 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" exists:
10 | fullname | shortname | category | legacyfiles |
11 | Course 1 | C1 | 0 | 2 |
12 And I log in as "admin"
13 And I set the following administration settings values:
14 | Legacy course files in new courses | 1 |
15 And I follow "Home"
16 And I follow "Course 1"
17 Then I should see "Legacy course files"
18 And I follow "Legacy course files"
19 And I press "Edit legacy course files"
20 Then I should see "Add..."
21 Then I should see "Create folder"
22
23 @javascript
24 Scenario: Add legacy file disabled
25 Given the following "courses" exists:
26 | fullname | shortname | category | legacyfiles |
27 | Course 1 | C1 | 0 | 2 |
28 And I log in as "admin"
29 And I set the following administration settings values:
30 | Legacy course files in new courses | 1 |
31 | Allow adding to legacy course files | 1 |
32 And I follow "Home"
33 And I follow "Course 1"
34 Then I should see "Legacy course files"
35 And I follow "Legacy course files"
36 And I press "Edit legacy course files"
37 Then I should not see "Add..."
38 Then I should not see "Create folder"