| Server IP : 104.21.80.248 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/myschool/triamudom/tuprblearn/mod/forum/tests/behat/ |
Upload File : |
@mod @mod_forum
Feature: Single simple forum discussion type
In order to restrict the discussion topic to one
As a teacher
I need to create a forum with a single simple discussion
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | [email protected] |
| student1 | Student | 1 | [email protected] |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | type | course | idnumber |
| forum | Single discussion forum name | Single discussion forum description | single | C1 | forum |
Scenario: Teacher can start the single simple discussion
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I follow "Single discussion forum name"
Then I should see "Single discussion forum description" in the "div.firstpost.starter" "css_element"
And I should not see "Add a new discussion topic"
Scenario: Student can not add more discussions
And I log in as "student1"
And I am on "Course 1" course homepage
When I reply "Single discussion forum name" post from "Single discussion forum name" forum with:
| Subject | Reply to single discussion subject |
| Message | Reply to single discussion message |
Then I should not see "Add a new discussion topic"
And I should see "Reply" in the "div.firstpost.starter" "css_element"
And I should see "Reply to single discussion message"