1 |
efrain |
1 |
@block @block_search_forums @mod_forum
|
|
|
2 |
Feature: The search forums block allows users to search for forum posts on frontpage
|
|
|
3 |
In order to search for a forum post
|
|
|
4 |
As an administrator
|
|
|
5 |
I can add the search forums block
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email | idnumber |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com | S1 |
|
|
|
11 |
And the following "blocks" exist:
|
|
|
12 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
13 |
| search_forums | System | 1 | site-index | side-pre |
|
|
|
14 |
|
|
|
15 |
Scenario: Use the search forum block on the frontpage and search for posts as a user
|
|
|
16 |
Given I log in as "student1"
|
|
|
17 |
And I am on site homepage
|
|
|
18 |
When I set the field "Search" to "Moodle"
|
|
|
19 |
And I press "Search"
|
|
|
20 |
Then I should see "No posts"
|
|
|
21 |
|
|
|
22 |
Scenario: Use the search forum block on the frontpage and search for posts as a guest
|
|
|
23 |
Given I log in as "guest"
|
|
|
24 |
And I am on site homepage
|
|
|
25 |
When I set the field "Search" to "Moodle"
|
|
|
26 |
And I press "Search"
|
|
|
27 |
Then I should see "No posts"
|