Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_private_files @_file_upload @javascript
2
Feature: The private files block allows users to store files privately in moodle on activity page
3
  In order to store a private file in moodle
4
  As a teacher
5
  I can upload the file to my private files area using the private files block in an activity
6
 
7
  Scenario: Upload a file to the private files block in an activity
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1 | 0 |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email |
13
      | teacher1 | Teacher | 1 | teacher1@example.com |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "activities" exist:
18
      | activity | course | idnumber | name           | intro                 |
19
      | page    | C1      | page1    | Test page name | Test page description |
20
    And the following "blocks" exist:
21
      | blockname     | contextlevel    | reference | pagetypepattern | defaultregion |
22
      | private_files | Activity module | page1     | mod-page-*      | side-pre      |
23
    And I am on the "Test page name" "page activity" page logged in as teacher1
24
    And I should see "No files available" in the "Private files" "block"
25
    When I follow "Manage private files..."
26
    And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager
27
    And I press "Save changes"
28
    Then I should see "testfile.txt" in the "Private files" "block"