mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 19:36:41 +02:00
MDL-69906 admin: Display Setup search engine as link only if it is valid
We use auto-generated admin section name here so we need to check that the target section actually exists.
This commit is contained in:
parent
46f977a8bf
commit
b295a88821
2 changed files with 30 additions and 4 deletions
22
search/tests/behat/setup_search_engine.feature
Normal file
22
search/tests/behat/setup_search_engine.feature
Normal file
|
@ -0,0 +1,22 @@
|
|||
@core @core_search
|
||||
Feature: Plugins > Search > Search setup contains Setup search engine only if the target section actually exists
|
||||
In order to set up the selected search engine
|
||||
As an admin
|
||||
I need to be able to click the link 'Setup search engine' but only if the target section actually exists
|
||||
|
||||
Scenario: Selected search engine has an admin section
|
||||
Given the following config values are set as admin:
|
||||
| enableglobalsearch | 1 |
|
||||
| searchengine | solr |
|
||||
And I log in as "admin"
|
||||
When I navigate to "Plugins > Search" in site administration
|
||||
Then "Setup search engine" "link" should exist
|
||||
|
||||
Scenario: Selected search engine does not have an admin section
|
||||
Given the following config values are set as admin:
|
||||
| enableglobalsearch | 1 |
|
||||
| searchengine | simpledb |
|
||||
And I log in as "admin"
|
||||
When I navigate to "Plugins > Search" in site administration
|
||||
Then I should see "Setup search engine"
|
||||
And "Setup search engine" "link" should not exist
|
Loading…
Add table
Add a link
Reference in a new issue