Files
moodle/files/tests/behat/course_files.feature
Damyon Wiese 46a2fbc4b7 MDL-49412 Navigation: Remaining behat fixed for nav branch
Behat is passing after this change.

Part of MDL-45774.
2015-04-10 17:19:28 +08:00

40 lines
1.3 KiB
Gherkin

@core @core_files
Feature: Course files
In order to add legacy files
As a user
I need to upload files
@javascript
Scenario: Add legacy files
Given the following "courses" exist:
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And the following config values are set as admin:
| legacyfilesinnewcourses | 1 |
| legacyfilesaddallowed | 1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
Then I should see "Legacy course files"
And I follow "Legacy course files"
And I press "Edit legacy course files"
And "Add..." "link" should be visible
And "Create folder" "link" should be visible
@javascript
Scenario: Add legacy file disabled
Given the following "courses" exist:
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And the following config values are set as admin:
| legacyfilesinnewcourses | 1 |
| legacyfilesaddallowed | 0 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
Then I should see "Legacy course files"
And I follow "Legacy course files"
And I press "Edit legacy course files"
And "Add..." "link" should not be visible
And "Create folder" "link" should not be visible