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: Forums in 'No groups' mode allow posting to All participants for all users
3
  In order to post to a forum in 'No groups' mode, which is in course which has groups
4
  As any user
5
  I need to post
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category |
14
      | Course 1 | C1 | 0 |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
    And the following "groups" exist:
20
      | name | course | idnumber |
21
      | Group A | C1 | G1 |
22
      | Group B | C1 | G2 |
23
    And the following "group members" exist:
24
      | user | group |
25
      | teacher1 | G1 |
26
      | teacher1 | G2 |
27
      | student1 | G1 |
28
    And the following "activities" exist:
29
      | activity   | name                   | course | idnumber     | groupmode |
30
      | forum      | Standard forum name    | C1     | nogroups     | 0         |
31
 
32
  Scenario: Teacher can post
33
    Given I am on the "Standard forum name" "forum activity" page logged in as teacher1
34
    And I should not see "Group A"
35
    And I should not see "Group B"
36
    When I click on "Add discussion topic" "link"
37
    Then I should not see "Post a copy to all groups"
38
    And I should not see "Group" in the "form" "css_element"
39
    And I set the following fields to these values:
40
      | Subject | Teacher 1 -> Forum  |
41
      | Message | Teacher 1 -> Forum  |
42
    And I press "Post to forum"
43
    And I wait to be redirected
44
    And I should see "Teacher 1 -> Forum"
45
 
46
  Scenario: Student can post
47
    Given I am on the "Standard forum name" "forum activity" page logged in as student1
48
    And I should not see "Group A"
49
    And I should not see "Group B"
50
    When I click on "Add discussion topic" "link"
51
    Then I should not see "Post a copy to all groups"
52
    And I should not see "Group" in the "form" "css_element"
53
    And I set the following fields to these values:
54
      | Subject | Student 1 -> Forum  |
55
      | Message | Student 1 -> Forum  |
56
    And I press "Post to forum"
57
    And I wait to be redirected
58
    And I should see "Student 1 -> Forum"