1 |
efrain |
1 |
@block @core_block @javascript @addablocklink
|
|
|
2 |
Feature: Add a block when main feature is enabled
|
|
|
3 |
In order to add a block to my course
|
|
|
4 |
As a teacher
|
|
|
5 |
Some blocks should be only added to courses if the main feature they are based on is enabled.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Course 1 | C1 | topics |
|
|
|
11 |
And I am on the "C1" "course" page logged in as "admin"
|
|
|
12 |
|
|
|
13 |
Scenario Outline: The block can be added when main feature is enabled
|
|
|
14 |
Given the following config values are set as admin:
|
|
|
15 |
| <settingname1> | 1 | <settingplugin1> |
|
|
|
16 |
| <settingname2> | 1 | |
|
|
|
17 |
And I turn editing mode on
|
|
|
18 |
When I click on "Add a block" "link"
|
|
|
19 |
Then I should see "<blockname>"
|
|
|
20 |
|
|
|
21 |
Examples:
|
|
|
22 |
| blockname | settingname1 | settingname2 | settingplugin1 |
|
|
|
23 |
| Accessibility review | enableaccessibilitytools | | |
|
|
|
24 |
| Blog menu | enableblogs | | |
|
|
|
25 |
| Recent blog entries | enableblogs | | |
|
|
|
26 |
| Blog tags | enableblogs | usetags | |
|
|
|
27 |
| Comments | usecomments | | |
|
|
|
28 |
| Course completion status | enablecompletion | | |
|
|
|
29 |
| Global search | enableglobalsearch | | |
|
|
|
30 |
| Latest badges | enablebadges | | |
|
|
|
31 |
| Tags | usetags | | |
|
|
|
32 |
| Learning plans | enabled | | core_competency |
|
|
|
33 |
|
|
|
34 |
Scenario Outline: The block cannot be added when main feature is disabled
|
|
|
35 |
Given the following config values are set as admin:
|
|
|
36 |
| <settingname1> | 0 | <settingplugin1> |
|
|
|
37 |
| <settingname2> | 0 | |
|
|
|
38 |
And I turn editing mode on
|
|
|
39 |
When I click on "Add a block" "link"
|
|
|
40 |
Then I should not see "<blockname>"
|
|
|
41 |
|
|
|
42 |
Examples:
|
|
|
43 |
| blockname | settingname1 | settingname2 | settingplugin1 |
|
|
|
44 |
| Accessibility review | enableaccessibilitytools | | |
|
|
|
45 |
| Blog menu | enableblogs | | |
|
|
|
46 |
| Recent blog entries | enableblogs | | |
|
|
|
47 |
| Blog tags | enableblogs | usetags | |
|
|
|
48 |
| Comments | usecomments | | |
|
|
|
49 |
| Course completion status | enablecompletion | | |
|
|
|
50 |
| Global search | enableglobalsearch | | |
|
|
|
51 |
| Latest badges | enablebadges | | |
|
|
|
52 |
| Tags | usetags | | |
|
|
|
53 |
| Learning plans | enabled | | core_competency |
|