[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/forum/tests/behat/ -> add_forum.feature (source)

   1  @mod @mod_forum @_file_upload
   2  Feature: Add forum activities and discussions
   3    In order to discuss topics with other users
   4    As a teacher
   5    I need to add forum activities to moodle courses
   6  
   7    @javascript
   8    Scenario: Add a forum and a discussion attaching files
   9      Given the following "users" exist:
  10        | username | firstname | lastname | email |
  11        | teacher1 | Teacher | 1 | teacher1@example.com |
  12        | student1 | Student | 1 | student1@example.com |
  13      And the following "courses" exist:
  14        | fullname | shortname | category |
  15        | Course 1 | C1 | 0 |
  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 "Forum" to section "1" and I fill the form with:
  24        | Forum name | Test forum name |
  25        | Forum type | Standard forum for general use |
  26        | Description | Test forum description |
  27      And I add a new discussion to "Test forum name" forum with:
  28        | Subject | Forum post 1 |
  29        | Message | This is the body |
  30      And I log out
  31      And I log in as "student1"
  32      And I follow "Course 1"
  33      When I add a new discussion to "Test forum name" forum with:
  34        | Subject | Post with attachment |
  35        | Message | This is the body |
  36        | Attachment | lib/tests/fixtures/empty.txt |
  37      And I reply "Forum post 1" post from "Test forum name" forum with:
  38        | Subject | Reply with attachment |
  39        | Message | This is the body |
  40        | Attachment | lib/tests/fixtures/upload_users.csv |
  41      Then I should see "Reply with attachment"
  42      And I should see "upload_users.csv"
  43      And I follow "Test forum name"
  44      And I follow "Post with attachment"
  45      And I should see "empty.txt"
  46      And I follow "Edit"
  47      And the field "Attachment" matches value "empty.txt"


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