forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! MDL-81924 core_sms: Add SMS gateway management UI
- Loading branch information
1 parent
c14292f
commit e93bbc3
Showing
3 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
admin/tool/mfa/factor/sms/tests/behat/factor_sms_setup_gateway.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@tool @tool_mfa @factor_sms | ||
Feature: Set up SMS factor when relevant gateway is not configured | ||
In order configure the SMS factor | ||
As an admin | ||
I want to be directed to the SMS gateway setup when necessary | ||
|
||
Scenario: Configuring gateways from the SMS factor settings | ||
Given I log in as "admin" | ||
And the following config values are set as admin: | ||
| enabled | 1 | tool_mfa | | ||
| lockout | 3 | tool_mfa | | ||
And the following config values are set as admin: | ||
| enabled | 1 | factor_sms | | ||
| weight | 100 | factor_sms | | ||
| duration | 1800 | factor_sms | | ||
When I navigate to "Plugins > Admin tools > Multi-factor authentication" in site administration | ||
And I follow "Edit settings for the SMS mobile phone factor" | ||
And I should see "To use SMS as an authentication factor, you first need to set up an SMS gateway." | ||
And I should see "set up an SMS gateway" | ||
And I follow "set up an SMS gateway" | ||
And I should see "Configure SMS gateway" | ||
And I set the following fields to these values: | ||
| SMS gateway provider | AWS | | ||
| Gateway name | First AWS gateway | | ||
| Country code | 61 | | ||
| Access key | key123 | | ||
| Secret access key | secret456 | | ||
| Amazon API gateway region | ap-southeast-2 | | ||
And I press "Save changes" | ||
Then I should see "SMS mobile phone" | ||
And the "SMS gateway" select box should contain "First AWS gateway (AWS)" | ||
And I follow "create a new gateway" | ||
And I should see "Configure SMS gateway" | ||
And I set the following fields to these values: | ||
| SMS gateway provider | AWS | | ||
| Gateway name | Second one | | ||
| Country code | 1 | | ||
| Access key | key1234 | | ||
| Secret access key | secret4567 | | ||
| Amazon API gateway region | ap-southeast-2 | | ||
And I press "Save changes" | ||
Then I should see "SMS mobile phone" | ||
And the "SMS gateway" select box should contain "First AWS gateway (AWS)" | ||
And the "SMS gateway" select box should contain "Second one (AWS)" |