weekly release 3.7dev
[moodle.git] / files / tests / behat / course_files.feature
CommitLineData
81ad5438 1@core @core_files
cc0bb815
EM
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
759b323e 9 Given the following "courses" exist:
cc0bb815
EM
10 | fullname | shortname | category | legacyfiles |
11 | Course 1 | C1 | 0 | 2 |
bed97c39
RT
12 And the following config values are set as admin:
13 | legacyfilesinnewcourses | 1 |
14 | legacyfilesaddallowed | 1 |
15 When I log in as "admin"
fdeeaff9 16 And I am on "Course 1" course homepage
e5287f9b 17 Then "Legacy course files" "link" should exist in current page administration
02fda279 18 And I navigate to "Legacy course files" in current page administration
cc0bb815 19 And I press "Edit legacy course files"
63950e4d
DM
20 And "Add..." "link" should be visible
21 And "Create folder" "link" should be visible
cc0bb815 22
89376590
DM
23 @javascript
24 Scenario: Add legacy file disabled
759b323e 25 Given the following "courses" exist:
89376590
DM
26 | fullname | shortname | category | legacyfiles |
27 | Course 1 | C1 | 0 | 2 |
bed97c39
RT
28 And the following config values are set as admin:
29 | legacyfilesinnewcourses | 1 |
30 | legacyfilesaddallowed | 0 |
31 When I log in as "admin"
fdeeaff9 32 And I am on "Course 1" course homepage
e5287f9b 33 Then "Legacy course files" "link" should exist in current page administration
02fda279 34 And I navigate to "Legacy course files" in current page administration
89376590 35 And I press "Edit legacy course files"
63950e4d
DM
36 And "Add..." "link" should not be visible
37 And "Create folder" "link" should not be visible