1 |
efrain |
1 |
@block @block_blog_recent
|
|
|
2 |
Feature: Feature: Users can use the recent blog entries block to view recent blog entries.
|
|
|
3 |
In order to enable the recent blog entries in a course
|
|
|
4 |
As a teacher
|
|
|
5 |
I can add recent blog entries block to a course
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email | idnumber |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
|
|
|
18 |
Scenario: Add the recent blogs block to a course when blogs are disabled
|
|
|
19 |
Given I log in as "teacher1"
|
|
|
20 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
21 |
When I add the "Recent blog entries" block
|
|
|
22 |
And the following config values are set as admin:
|
|
|
23 |
| enableblogs | 0 |
|
|
|
24 |
And I reload the page
|
|
|
25 |
Then I should see "Blogging is disabled!" in the "Recent blog entries" "block"
|
|
|
26 |
|
|
|
27 |
Scenario: Add the recent blogs block to a course when there are not any blog posts
|
|
|
28 |
Given I log in as "teacher1"
|
|
|
29 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
30 |
When I add the "Recent blog entries" block
|
|
|
31 |
Then I should see "No recent entries" in the "Recent blog entries" "block"
|