MDL-38437 behat: Behat feature for mod_forum
[moodle.git] / mod / forum / tests / behat / add_forum.feature
CommitLineData
e6cb6aed
DM
1@mod_forum
2Feature: Add forum activities and discussions
3 In order to discuss topics with other users
4 As a moodle teacher
5 I need to add forum activities to moodle courses
6
7 @javascript
8 Scenario: Add a forum and a discussion
9 Given the following "users" exists:
10 | username | firstname | lastname | email |
11 | teacher1 | Teacher | 1 | teacher1@asd.com |
12 And the following "courses" exists:
13 | fullname | shortname | category |
14 | Course 1 | C1 | 0 |
15 And the following "course enrolments" exists:
16 | user | course | role |
17 | teacher1 | C1 | editingteacher |
18 And I log in as "teacher1"
19 And I follow "Course 1"
20 And I turn editing mode on
21 And I add a "forum" to section "1" and I fill the form with:
22 | Forum name | Test forum name |
23 | Forum type | Standard forum for general use |
24 | Description | Test forum description |
25 When I add a new discussion to "Test forum name" forum with:
26 | Subject | Forum post 1 |
27 | Message | This is the body |
28 And I wait "6" seconds
29 Then I should see "Test forum name"