Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@format @format_social
2
Feature: Change number of discussions displayed
3
  In order to change the number of discussions displayed
4
  As a teacher
5
  I need to edit the course and change the number of sections displayed.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | category | format |
13
      | Course 1 | C1 | 0 | social |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "mod_forum > discussions" exist:
18
      | user     | forum        | subject       | message                  | created             | timemodified        |
19
      | teacher1 | Social forum | Forum Post 10 | This is forum post ten   | ##now +1 second##   | ##now +1 second##   |
20
      | teacher1 | Social forum | Forum Post 9  | This is forum post nine  | ##now +2 seconds##  | ##now +2 seconds##  |
21
      | teacher1 | Social forum | Forum Post 8  | This is forum post eight | ##now +3 seconds##  | ##now +3 seconds##  |
22
      | teacher1 | Social forum | Forum Post 7  | This is forum post seven | ##now +4 seconds##  | ##now +4 seconds##  |
23
      | teacher1 | Social forum | Forum Post 6  | This is forum post six   | ##now +5 seconds##  | ##now +5 seconds##  |
24
      | teacher1 | Social forum | Forum Post 5  | This is forum post five  | ##now +6 seconds##  | ##now +6 seconds##  |
25
      | teacher1 | Social forum | Forum Post 4  | This is forum post four  | ##now +7 seconds##  | ##now +7 seconds##  |
26
      | teacher1 | Social forum | Forum Post 3  | This is forum post three | ##now +8 seconds##  | ##now +8 seconds##  |
27
      | teacher1 | Social forum | Forum Post 2  | This is forum post two   | ##now +9 seconds##  | ##now +9 seconds##  |
28
      | teacher1 | Social forum | Forum Post 1  | This is forum post one   | ##now +10 seconds## | ##now +10 seconds## |
29
    And I am on the "C1" "course editing" page logged in as teacher1
30
 
31
  Scenario: When number of discussions is decreased fewer discussions appear
32
    Given I set the following fields to these values:
33
      | numdiscussions | 5 |
34
    When I press "Save and display"
35
    Then I should see "This is forum post one"
36
    And I should see "This is forum post five"
37
    And I should not see "This is forum post six"
38
 
39
  Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
40
    Given I set the following fields to these values:
41
      | numdiscussions | -1 |
42
    When I press "Save and display"
43
    Then I should see "This is forum post one"
44
    And I should not see "This is forum post two"
45
    And I should not see "This is forum post ten"
46
 
47
  Scenario: When number of discussions is increased more discussions appear
48
    Given I set the following fields to these values:
49
      | numdiscussions | 9 |
50
    When I press "Save and display"
51
    Then I should see "This is forum post one"
52
    And I should see "This is forum post five"
53
    And I should see "This is forum post nine"
54
    And I should not see "This is forum post ten"