1 |
efrain |
1 |
@block @block_glossary_random @javascript
|
|
|
2 |
Feature: Add the glossary random block when main feature is disabled
|
|
|
3 |
In order to add the glossary random block to my course
|
|
|
4 |
As a teacher
|
|
|
5 |
It should be added to courses only if the glossary module is enabled.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Course 1 | C1 | topics |
|
|
|
11 |
And the following "blocks" exist:
|
|
|
12 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
13 |
| glossary_random | Course | C1 | course-view-* | site-post |
|
|
|
14 |
|
|
|
15 |
Scenario: The glossary random block is displayed even when glossary module is disabled
|
|
|
16 |
When I log in as "admin"
|
|
|
17 |
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
|
|
|
18 |
And I click on "Disable Glossary" "icon" in the "Glossary" "table_row"
|
|
|
19 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
20 |
Then "Random glossary entry" "block" should exist
|
|
|
21 |
|
|
|
22 |
Scenario: The glossary random block can be removed even when glossary module is disabled
|
|
|
23 |
When I log in as "admin"
|
|
|
24 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
25 |
And I open the "Random glossary entry" blocks action menu
|
|
|
26 |
And I click on "Delete Random glossary entry block" "link" in the "Random glossary entry" "block"
|
|
|
27 |
And "Delete block?" "dialogue" should exist
|
|
|
28 |
And I click on "Cancel" "button" in the "Delete block?" "dialogue"
|
|
|
29 |
And "Random glossary entry" "block" should exist
|
|
|
30 |
When I navigate to "Plugins > Activity modules > Manage activities" in site administration
|
|
|
31 |
And I click on "Disable Glossary" "icon" in the "Glossary" "table_row"
|
|
|
32 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
33 |
And I open the "Random glossary entry" blocks action menu
|
|
|
34 |
And I click on "Delete Random glossary entry block" "link" in the "Random glossary entry" "block"
|
|
|
35 |
And I click on "Delete" "button" in the "Delete block?" "dialogue"
|
|
|
36 |
Then "Random glossary entry" "block" should not exist
|