-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathblock_blogmenu.feature
More file actions
33 lines (30 loc) · 1.85 KB
/
Copy pathblock_blogmenu.feature
File metadata and controls
33 lines (30 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@app_parallel_run_blog @addon_block_blog_menu @app @block @block_blog_menu @javascript
Feature: Basic tests of blog menu block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| blog_menu | Course | C1 | course-view-* | side-pre |
Scenario: View and navigate the blog menu block in a course
Given I entered the course "Course 1" as "student1" in the app
When I press "Open block drawer" in the app
Then I should find "Blog menu" in the app
And I should find "Blog entries" in the app
Scenario: Block is included in disabled features
# Add another block just to ensure there is something in the block region and the drawer is displayed.
Given the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion | configdata |
| html | Course | C1 | course-view-* | side-pre | Tzo4OiJzdGRDbGFzcyI6Mjp7czo1OiJ0aXRsZSI7czoxNToiSFRNTCB0aXRsZSB0ZXN0IjtzOjQ6InRleHQiO3M6OToiYm9keSB0ZXN0Ijt9 |
And the following config values are set as admin:
| disabledfeatures | CoreBlockDelegate_AddonBlockBlogMenu | tool_mobile |
And I entered the course "Course 1" as "student1" in the app
When I press "Open block drawer" in the app
Then I should not find "Blog menu" in the app