1 |
efrain |
1 |
@block @block_multiblock
|
|
|
2 |
Feature: The block can have administrator set defaults
|
|
|
3 |
In order to be customize the multiblock
|
|
|
4 |
As an admin
|
|
|
5 |
I need to be able to assign some site wide defaults
|
|
|
6 |
Background:
|
|
|
7 |
Given the following "users" exist:
|
|
|
8 |
| username | firstname | lastname | email |
|
|
|
9 |
| teacher1 | Teacher | One | teacher@example.com |
|
|
|
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 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
| student1 | C1 | student |
|
|
|
18 |
|
|
|
19 |
Scenario: Test setting the multiblock title.
|
|
|
20 |
Given the following config values are set as admin:
|
|
|
21 |
| title | Course Toolkit | block_multiblock |
|
|
|
22 |
When I log in as "teacher1"
|
|
|
23 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
24 |
And I add the "Multiblock" block
|
|
|
25 |
Then I should see "Course Toolkit"
|
|
|
26 |
|
|
|
27 |
Scenario: Test setting the multiblock presnetation style.
|
|
|
28 |
Given the following config values are set as admin:
|
|
|
29 |
| presentation | 0 | block_multiblock |
|
|
|
30 |
| subblock | calendar_month | block_multiblock |
|
|
|
31 |
When I log in as "teacher1"
|
|
|
32 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
33 |
And I add the "Multiblock" block
|
|
|
34 |
Then ".multiblock.multiblock-accordion" "css_element" should exist
|
|
|
35 |
|
|
|
36 |
Scenario: Test setting the default blocks.
|
|
|
37 |
Given the following config values are set as admin:
|
|
|
38 |
| subblock | calendar_month | block_multiblock |
|
|
|
39 |
When I log in as "teacher1"
|
|
|
40 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
41 |
And I add the "Multiblock" block
|
|
|
42 |
Then "Calendar" "text" should exist in the "Multiblock" "block"
|