[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/search_forums/tests/behat/ -> block_search_forums_course.feature (source)

   1  @block @block_search_forums @mod_forum
   2  Feature: The search forums block allows users to search for forum posts
   3    In order to search for a forum post
   4    As a user
   5    I can use the search forums block
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email | idnumber |
  10        | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
  11        | student1 | Student | 1 | student1@example.com | S1 |
  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 I log in as "teacher1"
  20      And I follow "Course 1"
  21      And I navigate to "Edit settings" node in "Course administration"
  22      And I set the field "id_newsitems" to "1"
  23      And I press "Save and display"
  24      And I log out
  25  
  26    Scenario: Use the search forum block in a course without any forum posts
  27      Given I log in as "student1"
  28      And I follow "Course 1"
  29      When I set the following fields to these values:
  30        | searchform_search | Moodle |
  31      And I press "Go"
  32      Then I should see "No posts"
  33  
  34    Scenario: Use the search forum block in a course with a hidden forum and search for posts
  35      Given I log in as "teacher1"
  36      And I follow "Course 1"
  37      And I add a new topic to "Announcements" forum with:
  38        | Subject | My subject |
  39        | Message | My message |
  40      And I follow "Course 1"
  41      And I turn editing mode on
  42      And I follow "Announcements"
  43      And I navigate to "Edit settings" node in "Forum administration"
  44      And I expand all fieldsets
  45      And I set the field "id_visible" to "0"
  46      And I press "Save and return to course"
  47      And I log out
  48      When I log in as "student1"
  49      And I follow "Course 1"
  50      And "Search forums" "block" should exist
  51      And I set the following fields to these values:
  52        | searchform_search | message |
  53      And I press "Go"
  54      Then I should see "No posts"
  55  
  56    Scenario: Use the search forum block in a course and search for posts
  57      Given I log in as "teacher1"
  58      And I follow "Course 1"
  59      And I add a new topic to "Announcements" forum with:
  60        | Subject | My subject |
  61        | Message | My message |
  62      And I log out
  63      When I log in as "student1"
  64      And I follow "Course 1"
  65      And "Search forums" "block" should exist
  66      And I set the following fields to these values:
  67        | searchform_search | message |
  68      And I press "Go"
  69      Then I should see "My subject"


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