[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/news_items/tests/behat/ -> display_news.feature (source)

   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 I log in as "admin"
  13      And I create a course with:
  14        | Course full name | Course 1 |
  15        | Course short name | C1 |
  16        | News items to show | 5 |
  17      And I enrol "Teacher 1" user as "Teacher"
  18      And I log out
  19      And I log in as "teacher1"
  20      And I follow "Course 1"
  21      When I add a new topic to "Announcements" forum with:
  22        | Subject | Discussion One |
  23        | Message | Not important |
  24      And I add a new topic to "Announcements" forum with:
  25        | Subject | Discussion Two |
  26        | Message | Not important |
  27      And I add a new topic to "Announcements" forum with:
  28        | Subject | Discussion Three |
  29        | Message | Not important |
  30      And I follow "Course 1"
  31      Then I should see "Discussion One" in the "Latest announcements" "block"
  32      And I should see "Discussion Two" in the "Latest announcements" "block"
  33      And I should see "Discussion Three" in the "Latest announcements" "block"
  34      And I follow "Edit settings"
  35      And I set the following fields to these values:
  36        | News items to show | 2 |
  37      And I press "Save and display"
  38      And I should not see "Discussion One" in the "Latest announcements" "block"
  39      And I should see "Discussion Two" in the "Latest announcements" "block"
  40      And I should see "Discussion Three" in the "Latest announcements" "block"
  41      And I follow "Edit settings"
  42      And I set the following fields to these values:
  43        | News items to show | 0 |
  44      And I press "Save and display"
  45      And "Latest announcements" "block" should not exist


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1