1 |
efrain |
1 |
@tool @tool_mfa @factor_sms
|
|
|
2 |
Feature: Set up SMS factor in user preferences
|
|
|
3 |
In order check the SMS factor verification
|
|
|
4 |
As an admin
|
|
|
5 |
I want to setup and enable the SMS factor for the current user
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And the following config values are set as admin:
|
|
|
10 |
| enabled | 1 | tool_mfa |
|
|
|
11 |
And the following config values are set as admin:
|
|
|
12 |
| enabled | 1 | factor_sms |
|
|
|
13 |
When I follow "Preferences" in the user menu
|
|
|
14 |
And I click on "Multi-factor authentication preferences" "link"
|
|
|
15 |
And I click on "Set up" "button"
|
|
|
16 |
|
|
|
17 |
Scenario: Phone number setup form validation
|
|
|
18 |
Given I set the field "Mobile number" to "++5555sss"
|
|
|
19 |
And I press "Send code"
|
|
|
20 |
And I should see "The phone number you provided is not in a valid format."
|
|
|
21 |
And I set the field "Mobile number" to "0123456789"
|
|
|
22 |
And I press "Send code"
|
|
|
23 |
And I should see "The phone number you provided is not in a valid format."
|
|
|
24 |
And I set the field "Mobile number" to "786-307-3615"
|
|
|
25 |
And I press "Send code"
|
|
|
26 |
And I should see "The phone number you provided is not in a valid format."
|
|
|
27 |
When I set the field "Mobile number" to "649709233"
|
|
|
28 |
And I press "Send code"
|
|
|
29 |
Then I should see "The phone number you provided is not in a valid format."
|
|
|
30 |
|
|
|
31 |
Scenario: Edit phone number
|
|
|
32 |
Given I set the field "Mobile number" to "+34649709233"
|
|
|
33 |
And I press "Send code"
|
|
|
34 |
And I click on "Edit phone number" "link"
|
|
|
35 |
And I should see "Mobile number"
|
|
|
36 |
When I set the field "Mobile number" to "+34649709232"
|
|
|
37 |
And I press "Send code"
|
|
|
38 |
Then I should see "Enter code"
|
|
|
39 |
|
|
|
40 |
Scenario: Code setup form validation
|
|
|
41 |
Given I set the field "Mobile number" to "+34649709233"
|
|
|
42 |
And I press "Send code"
|
|
|
43 |
And I should see "Enter code"
|
|
|
44 |
When I set the field "Enter code" to "555556"
|
|
|
45 |
And I click on "Save" "button"
|
|
|
46 |
And I should see "Wrong code. Try again"
|
|
|
47 |
And I set the field "Enter code" to "ddddd5"
|
|
|
48 |
And I click on "Save" "button"
|
|
|
49 |
Then I should see "Wrong code. Try again"
|