1 |
efrain |
1 |
@block @block_multiblock @javascript
|
|
|
2 |
Feature: Front page test
|
|
|
3 |
In order to customise the front page
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to put multiple blocks in a single space
|
|
|
6 |
|
|
|
7 |
Scenario: Adding a Multiblock on the front page
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | User | student1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname |
|
|
|
13 |
| Course 1 | C1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| student1 | C1 | student |
|
|
|
17 |
When I log in as "admin"
|
|
|
18 |
And I am on site homepage
|
|
|
19 |
And I turn editing mode on
|
|
|
20 |
And I add the "Multiblock" block
|
|
|
21 |
And I manage the contents of "Multiblock" block
|
|
|
22 |
And I should see "This multiblock has no blocks inside it."
|
|
|
23 |
And I expand all fieldsets
|
|
|
24 |
And I set the field "Add a block" to "Logged in user"
|
|
|
25 |
And I click on "input[value=Add]" "css_element"
|
|
|
26 |
And I should see "Manage Multiblock contents"
|
|
|
27 |
And I should see "Logged in user"
|
|
|
28 |
And I expand all fieldsets
|
|
|
29 |
And I set the field "Add a block" to "Recent activity"
|
|
|
30 |
And I click on "input[value=Add]" "css_element"
|
|
|
31 |
And I log out
|
|
|
32 |
And I log in as "student1"
|
|
|
33 |
And I am on site homepage
|
|
|
34 |
Then I should see "Multiblock"
|
|
|
35 |
And I should see "Logged in user"
|
|
|
36 |
And I should see "Recent activity"
|