diff --git a/admin/tool/httpsreplace/settings.php b/admin/tool/httpsreplace/settings.php
index 41b69daa59d..6ad3d27738b 100644
--- a/admin/tool/httpsreplace/settings.php
+++ b/admin/tool/httpsreplace/settings.php
@@ -28,5 +28,5 @@ if ($hassiteconfig) {
$pluginname = get_string('pluginname', 'tool_httpsreplace');
$url = $CFG->wwwroot.'/'.$CFG->admin.'/tool/httpsreplace/index.php';
- $ADMIN->add('unsupported', new admin_externalpage('toolhttpsreplace', $pluginname, $url, 'moodle/site:config', true));
+ $ADMIN->add('security', new admin_externalpage('toolhttpsreplace', $pluginname, $url, 'moodle/site:config'));
}
diff --git a/admin/tool/httpsreplace/tests/behat/httpsreplace.feature b/admin/tool/httpsreplace/tests/behat/httpsreplace.feature
new file mode 100644
index 00000000000..dba1100136b
--- /dev/null
+++ b/admin/tool/httpsreplace/tests/behat/httpsreplace.feature
@@ -0,0 +1,25 @@
+@tool @tool_httpsreplace
+Feature: View the httpsreplace report
+ In order to switch to https
+ As an admin
+ I need to be able to automatically replace http links
+
+ Background: Create some http links
+ Given I am on site homepage
+ And the following "courses" exist:
+ | fullname | shortname | category | summary |
+ | Course 1 | C1 | 0 |
|
+ And I log in as "admin"
+
+ @javascript
+ Scenario: Go to the HTTPS replace report screen. Make sure broken domains are reported.
+ When I navigate to "HTTPS replace" node in "Site administration > Security"
+ Then I should see "intentionally.unavailable"
+
+ @javascript
+ Scenario: Use the find and replace tool.
+ When I navigate to "HTTPS replace" node in "Site administration > Security"
+ And I set the field "I understand the risks of this operation" to "1"
+ And I press "Perform replacement"
+ Then I should see "intentionally.unavailable"
+ And I should see "download.moodle.org"