Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_filepicker @_file_upload
2
Feature: Edit file feature
3
  In order to edit a file
4
  As a user
5
  I need to be able to select the file in filemanager and modify the file information
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1 | 0 |
11
    And the following "blocks" exist:
12
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
13
      | private_files | System       | 1         | my-index        | side-post     |
14
    And I log in as "admin"
15
 
16
  @javascript
17
  Scenario: Select file from "Files" filemanager using "icons" view and edit the name
18
    Given I follow "Manage private files"
19
    And I click on "Display folder with file icons" "link" in the ".filemanager" "css_element"
20
    And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
21
    And I should see "empty.txt" in the ".fp-content .fp-file" "css_element"
22
    And I click on "//div[contains(concat(' ', normalize-space(@class), ' '), ' fp-file ')]/descendant::a[normalize-space(.)='empty.txt']" "xpath_element"
23
    And I should see "Edit empty.txt"
24
    And I set the following fields to these values:
25
      | Name  | empty_edited.txt |
26
    When I click on "Update" "button"
27
    Then I should see "empty_edited.txt" in the ".fp-content .fp-file" "css_element"
28
    And I should not see "empty.txt" in the ".fp-content .fp-file" "css_element"
29
 
30
  @javascript
31
  Scenario: Select file from "Files" filemanager using "list" view and edit the name
32
    Given I follow "Manage private files"
33
    And I click on "Display folder with file details" "link" in the ".filemanager" "css_element"
34
    And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
35
    And I should see "empty.txt" in the ".fp-content .fp-filename" "css_element"
36
    And I click on "//span[contains(concat(' ', normalize-space(@class), ' '), ' fp-filename-icon ')]/descendant::a[normalize-space(.)='empty.txt']" "xpath_element"
37
    And I should see "Edit empty.txt"
38
    And I set the following fields to these values:
39
      | Name  | empty_edited.txt |
40
    When I click on "Update" "button"
41
    Then I should see "empty_edited.txt" in the ".fp-content .fp-filename" "css_element"
42
    And I should not see "empty.txt" in the ".fp-content .fp-filename" "css_element"
43
 
44
  @javascript
45
  Scenario: Select file from "Files" filemanager using "tree" view and edit the name
46
    Given I follow "Manage private files"
47
    And I click on "Display folder as file tree" "link" in the ".filemanager" "css_element"
48
    And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
49
    And I should see "empty.txt" in the ".fp-content .fp-hascontextmenu .fp-filename" "css_element"
50
    And I click on "//span[contains(concat(' ', normalize-space(@class), ' '), ' fp-filename-icon ')]/descendant::a[normalize-space(.)='empty.txt']" "xpath_element"
51
    And I should see "Edit empty.txt"
52
    And I set the following fields to these values:
53
      | Name  | empty_edited.txt |
54
    When I click on "Update" "button"
55
    Then I should see "empty_edited.txt" in the ".fp-content .fp-hascontextmenu .fp-filename" "css_element"
56
    And I should not see "empty.txt" in the ".fp-content .fp-hascontextmenu .fp-filename" "css_element"