MDL-56614 block_navigation: Add block in behat tests
[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"
46a2fbc4 16 And I am on site homepage
cc0bb815
EM
17 And I follow "Course 1"
18 Then I should see "Legacy course files"
ba5c5083 19 And I navigate to "Legacy course files" node in "Course administration"
cc0bb815 20 And I press "Edit legacy course files"
63950e4d
DM
21 And "Add..." "link" should be visible
22 And "Create folder" "link" should be visible
cc0bb815 23
89376590
DM
24 @javascript
25 Scenario: Add legacy file disabled
759b323e 26 Given the following "courses" exist:
89376590
DM
27 | fullname | shortname | category | legacyfiles |
28 | Course 1 | C1 | 0 | 2 |
bed97c39
RT
29 And the following config values are set as admin:
30 | legacyfilesinnewcourses | 1 |
31 | legacyfilesaddallowed | 0 |
32 When I log in as "admin"
46a2fbc4 33 And I am on site homepage
89376590
DM
34 And I follow "Course 1"
35 Then I should see "Legacy course files"
ba5c5083 36 And I navigate to "Legacy course files" node in "Course administration"
89376590 37 And I press "Edit legacy course files"
63950e4d
DM
38 And "Add..." "link" should not be visible
39 And "Create folder" "link" should not be visible