1 |
efrain |
1 |
@core @core_block
|
|
|
2 |
Feature: Show hidden blocks in a docked block region when editing
|
|
|
3 |
In order to edit blocks in a hidden region
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to see the blocks when editing is on
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Course 1 | C1 | topics |
|
|
|
11 |
And the following "course enrolments" exist:
|
|
|
12 |
| user | course | role |
|
|
|
13 |
| admin | C1 | editingteacher |
|
|
|
14 |
And the following "blocks" exist:
|
|
|
15 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
16 |
| search_forums | Course | C1 | course-view-* | side-pre |
|
|
|
17 |
| news_items | Course | C1 | course-view-* | side-pre |
|
|
|
18 |
| calendar_upcoming | Course | C1 | course-view-* | side-pre |
|
|
|
19 |
| recent_activity | Course | C1 | course-view-* | side-pre |
|
|
|
20 |
And I log in as "admin"
|
|
|
21 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
22 |
# Hide all the blocks in the non-default region
|
|
|
23 |
And I configure the "Search forums" block
|
|
|
24 |
And I set the following fields to these values:
|
|
|
25 |
| Visible | No |
|
|
|
26 |
And I click on "Save changes" "button"
|
|
|
27 |
And I configure the "Latest announcements" block
|
|
|
28 |
And I set the following fields to these values:
|
|
|
29 |
| Visible | No |
|
|
|
30 |
And I click on "Save changes" "button"
|
|
|
31 |
And I configure the "Upcoming events" block
|
|
|
32 |
And I set the following fields to these values:
|
|
|
33 |
| Visible | No |
|
|
|
34 |
And I click on "Save changes" "button"
|
|
|
35 |
And I configure the "Recent activity" block
|
|
|
36 |
And I set the following fields to these values:
|
|
|
37 |
| Visible | No |
|
|
|
38 |
When I click on "Save changes" "button"
|
|
|
39 |
# Editing is on so they should be visible
|
|
|
40 |
Then I should see "Search forums"
|
|
|
41 |
And I should see "Latest announcements"
|
|
|
42 |
And I should see "Upcoming events"
|
|
|
43 |
And I should see "Recent activity"
|
|
|
44 |
And I turn editing mode off
|
|
|
45 |
# Editing is off, so they should no longer be visible
|
|
|
46 |
And I should not see "Search forums"
|
|
|
47 |
And I should not see "Latest announcements"
|
|
|
48 |
And I should not see "Upcoming events"
|
|
|
49 |
And I should not see "Recent activity"
|
|
|
50 |
|
|
|
51 |
@javascript
|
|
|
52 |
Scenario: Check that a region with only hidden blocks is not docked in editing mode (javascript enabled)
|
|
|
53 |
|
|
|
54 |
Scenario: Check that a region with only hidden blocks is not docked in editing mode (javascript disabled)
|