Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_news_items
2
Feature: Latest announcements block displays the course latest news
3
  In order to be aware of the course announcements
4
  As a user
5
  I need to see the latest announcements block in the main course page
6
 
7
  @javascript
8
  Scenario: Latest course announcements are displayed and can be configured
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category | newsitems |
14
      | Course 1 | C1        | 0        | 5         |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
    And the following "blocks" exist:
19
      | blockname  | contextlevel | reference | pagetypepattern | defaultregion |
20
      | news_items | Course       | C1        | course-view-*   | side-pre      |
21
    And the following "mod_forum > discussions" exist:
22
      | user     | forum         | name             | message       |
23
      | teacher1 | Announcements | Discussion One   | Not important |
24
      | teacher1 | Announcements | Discussion Two   | Not important |
25
      | teacher1 | Announcements | Discussion Three | Not important |
26
    When I am on the "Course 1" Course page logged in as teacher1
27
    Then I should see "Discussion One" in the "Latest announcements" "block"
28
    And I should see "Discussion Two" in the "Latest announcements" "block"
29
    And I should see "Discussion Three" in the "Latest announcements" "block"
30
    And I navigate to "Settings" in current page administration
31
    And I set the following fields to these values:
32
      | Number of announcements | 2 |
33
    And I press "Save and display"
34
    And I should not see "Discussion One" in the "Latest announcements" "block"
35
    And I should see "Discussion Two" in the "Latest announcements" "block"
36
    And I should see "Discussion Three" in the "Latest announcements" "block"
37
    And I navigate to "Settings" in current page administration
38
    And I set the following fields to these values:
39
      | Number of announcements | 0 |
40
    And I press "Save and display"
41
    And "Latest announcements" "block" should not exist