DML-38814 behat: Split steps definitions tests into features

This commit is contained in:
David Monllao
2013-04-01 12:22:40 +08:00
parent d87bbb3d3d
commit 95932c376b
2 changed files with 56 additions and 0 deletions
@@ -0,0 +1,26 @@
@core_form @filepicker
Feature: Create folders in the file manager
In order to create a directory structure in a file area
As a moodle user
I need to create folders and subfolders in a file area
@javascript
Scenario: Create folders and subfolders
Given the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Course 1"
And I turn editing mode on
And I add a "Folder" to section "0"
And I fill the moodle form with:
| Name | Folder resource |
| Description | The description |
And I create "Folder 1" folder in "Files" filepicker
And I open "Folder 1" folder from "Files" filepicker
And I create "SubFolder 1" folder in "Files" filepicker
When I open "Files" folder from "Files" filepicker
Then I should see "Folder 1"
And I open "Folder 1" folder from "Files" filepicker
And I should see "SubFolder 1"
And I press "Save and return to course"
@@ -0,0 +1,30 @@
@core_form @filepicker
Feature: Zip folders and unzip compressed files
In order to download or add contents to file areas easily
As a moodle user
I need to zip and unzip folders and files
@javascript
Scenario: Zip and unzip folders and files
Given the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Course 1"
And I turn editing mode on
And I add a "Folder" to section "0"
And I fill the moodle form with:
| Name | Folder resource |
| Description | The description |
And I create "Folder 1" folder in "Files" filepicker
And I open "Folder 1" folder from "Files" filepicker
And I create "SubFolder 1" folder in "Files" filepicker
And I open "Files" folder from "Files" filepicker
And I zip "Folder 1" folder from "Files" filepicker
And I delete "Folder 1" from "Files" filepicker
When I unzip "Folder 1.zip" file from "Files" filepicker
And I delete "Folder 1.zip" from "Files" filepicker
Then I should see "Folder 1"
And I open "Folder 1" folder from "Files" filepicker
And I should see "SubFolder 1"
And I press "Save and return to course"