1 |
efrain |
1 |
@core @core_filepicker @_file_upload
|
|
|
2 |
Feature: A selected file can be cancelled
|
|
|
3 |
In order to refine the file manager contents
|
|
|
4 |
As a user
|
|
|
5 |
I need to cancel a selected file
|
|
|
6 |
|
|
|
7 |
@javascript @_bug_phantomjs
|
|
|
8 |
Scenario: Cancel a selected recent file from being added to a folder
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category |
|
|
|
11 |
| Course 1 | C1 | 0 |
|
|
|
12 |
And the following "blocks" exist:
|
|
|
13 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
14 |
| private_files | System | 1 | my-index | side-post |
|
|
|
15 |
And the following "activities" exist:
|
|
|
16 |
| activity | course | name | intro |
|
|
|
17 |
| folder | C1 | Folder name | Folder description |
|
|
|
18 |
And I log in as "admin"
|
|
|
19 |
And I follow "Manage private files"
|
|
|
20 |
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
|
|
|
21 |
And I press "Save changes"
|
|
|
22 |
And I am on the "Folder name" "folder activity" page
|
|
|
23 |
And I press "Edit"
|
|
|
24 |
And I upload "lib/tests/fixtures/upload_users.csv" file to "Files" filemanager
|
|
|
25 |
And I click on "Add..." "button" in the "Files" "form_row"
|
|
|
26 |
And I click on "Recent files" "link" in the ".fp-repo-area" "css_element"
|
|
|
27 |
And I click on "//a[contains(concat(' ', normalize-space(@class), ' '), ' fp-file ')][normalize-space(.)='empty.txt']" "xpath_element"
|
|
|
28 |
And I click on ".moodle-dialogue-focused .fp-select .fp-select-cancel" "css_element"
|
|
|
29 |
And I click on "Close" "button" in the "File picker" "dialogue"
|
|
|
30 |
And I press "Save changes"
|
|
|
31 |
Then I should see "upload_users.csv"
|
|
|
32 |
And I should not see "empty.txt"
|
|
|
33 |
And I should see "Folder description"
|