MDL-41940 files Additional behat cleanup
[moodle.git] / files / tests / behat / course_files.feature
CommitLineData
53d79266 1@core @core_files @_only_local
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
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 |
ff715cc9 15 | Allow adding to legacy course files | 1 |
53d79266 16 When I follow "Home"
cc0bb815
EM
17 And I follow "Course 1"
18 Then I should see "Legacy course files"
19 And I follow "Legacy course files"
20 And I press "Edit legacy course files"
53d79266
EM
21 And I should see "Add..."
22 And I should see "Create folder"
cc0bb815 23
ff715cc9
EM
24##Commented out pending MDL-42013 visibility checking.
25# @javascript
26# Scenario: Add legacy file disabled
27# Given the following "courses" exists:
28# | fullname | shortname | category | legacyfiles |
29# | Course 1 | C1 | 0 | 2 |
30# And I log in as "admin"
31# And I set the following administration settings values:
32# | Legacy course files in new courses | 1 |
33# | Allow adding to legacy course files | 0 |
53d79266 34# When I follow "Home"
ff715cc9
EM
35# And I follow "Course 1"
36# Then I should see "Legacy course files"
37# And I follow "Legacy course files"
38# And I press "Edit legacy course files"
53d79266
EM
39# And I should not see "Add..."
40# And I should not see "Create folder"