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: Forum posts display word count
3
  In order to display forum word count
4
  As a teacher
5
  I need to be able to update forum and set "Display word count" to Yes
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email          |
10
      | teacher1 | Teacher   | 1        | t1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1        | 0        |
14
    And the following "course enrolments" exist:
15
      | user     | course | role           |
16
      | teacher1 | C1     | editingteacher |
17
 
18
  Scenario: Forum posts display word count for single simple discussion forum
19
    Given the following "activities" exist:
20
      | activity | course | name    | type   | displaywordcount | intro             |
21
      | forum    | C1     | Forum 1 | single | 1                | Single forum post |
22
    When I am on the "Forum 1" "forum activity" page logged in as teacher1
23
    Then I should see "3 words"
24
    And I am on the "Forum 1" "forum activity editing" page
25
    And I expand all fieldsets
26
    And I set the field "Display word count" to "No"
27
    And I press "Save and display"
28
    And I am on the "Forum 1" "forum activity" page
29
    And I should not see "3 words"
30
 
31
  Scenario: Forum posts display word count for blog-like forum
32
    Given the following "activities" exist:
33
      | activity | course | name    | type | displaywordcount |
34
      | forum    | C1     | Forum 1 | blog | 1                |
35
    And the following "mod_forum > discussions" exist:
36
      | forum   | name       | subject    | message                   |
37
      | Forum 1 | Blog Forum | Blog Forum | This is a blog forum post |
38
    When I am on the "Forum 1" "forum activity" page logged in as teacher1
39
    Then I should see "6 words"
40
    And I am on the "Forum 1" "forum activity editing" page
41
    And I expand all fieldsets
42
    And I set the field "Display word count" to "No"
43
    And I press "Save and display"
44
    And I am on the "Forum 1" "forum activity" page
45
    And I should not see "6 words"
46
 
47
  Scenario Outline: Forum posts display word count for other forum types
48
    Given the following "activities" exist:
49
      | activity | course | name    | type   | displaywordcount |
50
      | forum    | C1     | Forum 1 | <type> | 1                |
51
    And the following "mod_forum > discussions" exist:
52
      | forum   | name      | subject   | message   |
53
      | Forum 1 | <typeext> | <typeext> | <message> |
54
    When I am on the "Forum 1" "forum activity" page logged in as teacher1
55
    And I follow "<typeext>"
56
    Then I should see "<count> words"
57
    And I am on the "Forum 1" "forum activity editing" page
58
    And I expand all fieldsets
59
    And I set the field "Display word count" to "No"
60
    And I press "Save and display"
61
    And I am on the "Forum 1" "forum activity" page
62
    And I follow "<typeext>"
63
    Then I should not see "<count> words"
64
 
65
    Examples:
66
      | type     | typeext         | message                         | count |
67
      | general  | General Forum   | General discussion in forum     | 4     |
68
      | eachuser | Each User Forum | This is an each user forum post | 7     |
69
      | qanda    | Q and A Forum   | This is a Q and A type forum    | 8     |