Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_folder @block @block_recent_activity
2
Feature: Files added in folder activity are visible in the recent activity block
3
  In order to view and download folder activity from recent activity block
4
  As a teacher
5
  I should be able to create folder activity with contents
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname |
10
      | Course 1 | C1        |
11
    And the following "blocks" exist:
12
      | blockname       | contextlevel | reference | pagetypepattern | defaultregion |
13
      | recent_activity | Course       | C1        | course-view-*   | side-pre      |
14
    And the following "activities" exist:
15
      | activity | course | name     |
16
      | folder   | C1     | Folder 1 |
17
 
18
  @_file_upload @javascript
19
  Scenario: Files added in folder activity are visible in recent activity block
20
    Given I am on the "Folder 1" "folder activity" page logged in as admin
21
    And I click on "Edit" "button"
22
    # Upload different file types in folder resource
23
    And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
24
    And I upload "lib/tests/fixtures/gd-logo.png" file to "Files" filemanager
25
    And I press "Save changes"
26
    # Confirm folder activity and files within the folder are visible in Recent activity block
27
    When I am on the "Course 1" course page
28
    Then I should see "Folder 1" in the "Recent activity" "block"
29
    And I should see "empty.txt" in the "Recent activity" "block"
30
    And I should see "gd-logo.png" in the "Recent activity" "block"
31
    And I click on "Full report of recent activity..." "link"
32
    # Confirm files within folder activity are visible in the full report
33
    And "Folder 1" "link" should exist
34
    And "empty.txt" "link" should exist
35
    And "gd-logo.png" "link" should exist
36
    And "//img[@alt='empty.txt']" "xpath_element" should exist
37
    And "//img[contains(@src, 'preview=tinyicon')]" "xpath_element" should exist
38
    # Confirm files are downloadable
39
    And following "empty.txt" should download between "1" and "3000" bytes
40
    And following "gd-logo.png" should download between "1" and "3000" bytes