[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/admin/tool/uploadcourse/tests/behat/ -> create.feature (source)

   1  @tool @tool_uploadcourse @_file_upload
   2  Feature: An admin can create courses using a CSV file
   3    In order to create courses using a CSV file
   4    As an admin
   5    I need to be able to upload a CSV file and navigate through the import process
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category |
  10        | First course | C1 | 0 |
  11      And I log in as "admin"
  12      And I navigate to "Upload courses" node in "Site administration > Courses"
  13  
  14    @javascript
  15    Scenario: Creation of unexisting courses
  16      Given I upload "admin/tool/uploadcourse/tests/fixtures/courses.csv" file to "File" filemanager
  17      And I click on "Preview" "button"
  18      When I click on "Upload courses" "button"
  19      Then I should see "The course exists and update is not allowed"
  20      And I should see "Course created"
  21      And I should see "Courses total: 3"
  22      And I should see "Courses created: 2"
  23      And I should see "Courses errors: 1"
  24      And I am on site homepage
  25      And I should see "Course 2"
  26      And I should see "Course 3"
  27  
  28    @javascript
  29    Scenario: Creation of existing courses
  30      Given I upload "admin/tool/uploadcourse/tests/fixtures/courses.csv" file to "File" filemanager
  31      And I set the field "Upload mode" to "Create all, increment shortname if needed"
  32      And I click on "Preview" "button"
  33      When I click on "Upload courses" "button"
  34      Then I should see "Course created"
  35      And I should see "Course shortname incremented C1 -> C2"
  36      And I should see "Course shortname incremented C2 -> C3"
  37      And I should see "Course shortname incremented C3 -> C4"
  38      And I should see "Courses total: 3"
  39      And I should see "Courses created: 3"
  40      And I should see "Courses errors: 0"
  41      And I am on site homepage
  42      And I should see "Course 1"
  43      And I should see "Course 2"
  44      And I should see "Course 3"


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