moodle/admin/tests/behat/search_areas.feature
sam marshall 9a53cdb0fc MDL-61076 core_search: Require confirmation for search areas actions
The search areas screen contains several options which are potentially
risky for a live site but can be triggered by accidentally clicking a
single button or link.

This change adds a confirmation prompt for all these options.

The enable/disable search area icon does not have a confirmation
prompt because this is nondestructive (you can just click the icon
again to change it back).
2018-03-29 17:41:01 +01:00

22 lines
1.0 KiB
Gherkin

@core @core_admin
Feature: Use the search areas admin screen
In order to control search indexing
As an admin
I need to use the search areas admin screen
Background:
Given I log in as "admin"
And I navigate to "Plugins > Search > Search areas" in site administration
Scenario: Disable and enable a search area
When I click on "Disable" "link" in the "Book - resource information" "table_row"
Then I should see "Search area disabled" in the ".alert-success" "css_element"
And I should see "Search area disabled" in the "Book - resource information" "table_row"
When I click on "Enable" "link" in the "Book - resource information" "table_row"
Then I should see "Search area enabled" in the ".alert-success" "css_element"
And I should not see "Search area disabled" in the "Book - resource information" "table_row"
# Note: Other scenarios are not currently easy to implement in Behat because there is no mock
# search engine - we could add testing once Moodle has an internal database search engine.