Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@mod @mod_assign
2
Feature: Additional files for use in assignments can be hidden
3
  In order to display additional files only during submission
4
  As a teacher
5
  I need to check the 'Only show files during submission' checkbox
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | One      | teacher1@example.com |
11
      | student1 | Student   | One      | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname |
14
      | Course 1 | C1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
 
20
  @javascript @_file_upload
21
  Scenario: Additional files are only shown during submission
22
    Given the following "activities" exist:
23
      | activity | course | name     | submissionattachments | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
24
      | assign   | C1     | Assign 1 | 1                     | 1                                   | 0                             |
25
    And I am on the "Assign 1" "assign activity editing" page logged in as teacher1
26
    And I upload "/mod/assign/tests/fixtures/submissionsample01.txt" file to "Additional files" filemanager
27
    And I press "Save and return to course"
28
    When I am on the "Assign 1" "assign activity" page logged in as student1
29
    # Confirm that Additional files are not displayed on assignment activity when student logs in.
30
    Then "submissionsample01.txt" "link" should not exist
31
    And I press "Add submission"
32
    # Additional files are displayed after student presses "Add submission" button and goes to submission phase.
33
    And "submissionsample01.txt" "link" should exist
34
    And following "submissionsample01.txt" should download a file that:
35
      | Has mimetype  | text/plain                                |
36
      | Contains text | This is just a submission testing sample. |