[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/tests/behat/ -> file_submission.feature (source)

   1  @mod @mod_assign @_file_upload
   2  Feature: In an assignment, students can upload files for assessment
   3    In order to complete my assignments providing files
   4    As a student
   5    I need to upload files from my file system to be assessed
   6  
   7    @javascript
   8    Scenario: Submit a file and update the submission with another file
   9      Given the following "courses" exist:
  10        | fullname | shortname | category | groupmode |
  11        | Course 1 | C1 | 0 | 1 |
  12      And the following "users" exist:
  13        | username | firstname | lastname | email |
  14        | teacher1 | Teacher | 1 | teacher1@example.com |
  15        | student1 | Student | 1 | student1@example.com |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20      And I log in as "teacher1"
  21      And I follow "Course 1"
  22      And I turn editing mode on
  23      And I add a "Assignment" to section "1" and I fill the form with:
  24        | Assignment name | Test assignment name |
  25        | Description | Submit your online text |
  26        | assignsubmission_onlinetext_enabled | 0 |
  27        | assignsubmission_file_enabled | 1 |
  28        | Maximum number of uploaded files | 2 |
  29      And I log out
  30      And I log in as "student1"
  31      And I follow "Course 1"
  32      And I follow "Test assignment name"
  33      When I press "Add submission"
  34      And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
  35      And I press "Save changes"
  36      Then I should see "Submitted for grading"
  37      And I should see "Not graded"
  38      And "empty.txt" "link" should exist
  39      And I press "Edit submission"
  40      And I upload "lib/tests/fixtures/upload_users.csv" file to "File submissions" filemanager
  41      And ".ffilemanager .fm-maxfiles .fp-btn-add" "css_element" should not be visible
  42      And I press "Save changes"
  43      And I should see "Submitted for grading"
  44      And "empty.txt" "link" should exist
  45      And "upload_users.csv" "link" should exist
  46      And I press "Edit submission"
  47      And ".ffilemanager .fm-maxfiles .fp-btn-add" "css_element" should not be visible
  48      And I delete "empty.txt" from "File submissions" filemanager
  49      And I press "Save changes"
  50      And "empty.txt" "link" should not exist
  51      And "upload_users.csv" "link" should exist


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1