Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_forum
2
Feature: Posting to forums in a course with no groups behaves correctly
3
 
4
  Background:
5
    Given the following "users" exist:
6
      | username | firstname | lastname | email |
7
      | teacher1 | Teacher | 1 | teacher1@example.com |
8
      | student1 | Student | 1 | student1@example.com |
9
    And the following "courses" exist:
10
      | fullname | shortname | category |
11
      | Course 1 | C1 | 0 |
12
    And the following "course enrolments" exist:
13
      | user | course | role |
14
      | teacher1 | C1 | editingteacher |
15
      | student1 | C1 | student |
16
    And the following "activities" exist:
17
      | activity   | name                   | course | idnumber     | groupmode |
18
      | forum      | Standard forum         | C1     | nogroups     | 0         |
19
      | forum      | Visible forum          | C1     | visgroups    | 2         |
20
      | forum      | Separate forum         | C1     | sepgroups    | 1         |
21
 
22
  Scenario: Teachers can post in standard forum
23
    Given I am on the "Standard forum" "forum activity" page logged in as teacher1
24
    When I click on "Add discussion topic" "link"
25
    Then I should not see "Post a copy to all groups"
26
    And I set the following fields to these values:
27
      | Subject | Teacher -> All participants |
28
      | Message | Teacher -> All participants |
29
    And I press "Post to forum"
30
    And I wait to be redirected
31
    And I should see "Teacher -> All participants"
32
 
33
  Scenario: Teachers can post in forum with separate groups
34
    Given I am on the "Separate forum" "forum activity" page logged in as teacher1
35
    When I click on "Add discussion topic" "link"
36
    Then I should not see "Post a copy to all groups"
37
    And I set the following fields to these values:
38
      | Subject | Teacher -> All participants |
39
      | Message | Teacher -> All participants |
40
    And I press "Post to forum"
41
    And I wait to be redirected
42
    And I should see "Teacher -> All participants"
43
 
44
  Scenario: Teachers can post in forum with visible groups
45
    Given I am on the "Visible forum" "forum activity" page logged in as teacher1
46
    When I click on "Add discussion topic" "link"
47
    Then I should not see "Post a copy to all groups"
48
    And I set the following fields to these values:
49
      | Subject | Teacher -> All participants |
50
      | Message | Teacher -> All participants |
51
    And I press "Post to forum"
52
    And I wait to be redirected
53
    And I should see "Teacher -> All participants"
54
 
55
  Scenario: Students can post in standard forum
56
    Given I am on the "Standard forum" "forum activity" page logged in as student1
57
    When I click on "Add discussion topic" "link"
58
    Then I should not see "Post a copy to all groups"
59
    And I set the following fields to these values:
60
      | Subject | Student -> All participants |
61
      | Message | Student -> All participants |
62
    And I press "Post to forum"
63
    And I wait to be redirected
64
    And I should see "Student -> All participants"
65
 
66
  Scenario: Students cannot post in forum with separate groups
67
    When I am on the "Separate forum" "forum activity" page logged in as student1
68
    Then I should see "You are not able to create a discussion because you are not a member of any group."
69
    And I should not see "Add discussion topic"
70
 
71
  Scenario: Students cannot post in forum with visible groups
72
    When I am on the "Visible forum" "forum activity" page logged in as student1
73
    Then I should see "You are not able to create a discussion because you are not a member of any group."
74
    And I should not see "Add discussion topic"