1 |
efrain |
1 |
@block @block_course_summary
|
|
|
2 |
Feature: Course summary block used on the frontpage
|
|
|
3 |
In order to help particpants know the summary of a site
|
|
|
4 |
As admin
|
|
|
5 |
I can use the course summary block on the frontpage
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And I enable "course_summary" "block" plugin
|
|
|
10 |
And the following "blocks" exist:
|
|
|
11 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
12 |
| course_summary | System | 1 | site-index | side-pre |
|
|
|
13 |
And I am on site homepage
|
|
|
14 |
And I navigate to "Site home > Site home settings" in site administration
|
|
|
15 |
And I set the following fields to these values:
|
|
|
16 |
| summary | Proved the summary block works! |
|
|
|
17 |
And I press "Save changes"
|
|
|
18 |
And I log out
|
|
|
19 |
# The course summary block a default front page block, so no need to add it.
|
|
|
20 |
|
|
|
21 |
Scenario: Guest can view site summary
|
|
|
22 |
When I am on site homepage
|
|
|
23 |
Then "Course/site summary" "block" should exist
|
|
|
24 |
And I should not see "Course summary" in the "Course/site summary" "block"
|
|
|
25 |
And I should see "Proved the summary block works!" in the "Course/site summary" "block"
|
|
|
26 |
|
|
|
27 |
Scenario: Admin can not see edit icon when edit mode is off
|
|
|
28 |
When I log in as "admin"
|
|
|
29 |
And I am on site homepage
|
|
|
30 |
Then I should see "Proved the summary block works!" in the "Course/site summary" "block"
|
|
|
31 |
And I should not see "Course summary" in the "Course/site summary" "block"
|
|
|
32 |
And "Edit" "link" should not exist in the "Course/site summary" "block"
|