-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathblock_globalsearch.feature
More file actions
40 lines (37 loc) · 2.24 KB
/
Copy pathblock_globalsearch.feature
File metadata and controls
40 lines (37 loc) · 2.24 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
34
35
36
37
38
39
40
@app_parallel_run_search @addon_block_globalsearch @app @block @block_globalsearch @javascript @lms_from4.3
Feature: View the global search block and check it links to the page
Background:
Given the Moodle site is compatible with this feature
And the following "users" exist:
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And the following config values are set as admin:
| enableglobalsearch | 1 |
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 |
| globalsearch | Course | C1 | course-view-* | side-pre |
Scenario: View and navigate the global search 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 "Search" in the app
When I press "Search" in the app
Then the header should be "Search" in the app
When I set the field "Search" to "Moodle" in the app
And I press "Search" "button" in the app
Then I should find "No results for" 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 | NoDelegate_GlobalSearch | 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 "Search" in the app