Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_mfa @factor_sms
2
Feature: Login user with sms authentication factor
3
  In order to login using SMS factor authentication
4
  As an user
5
  I need to be able to login
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
      | lockout | 3 | tool_mfa |
12
    And the following config values are set as admin:
13
      | enabled | 1 | factor_sms |
14
    # Set up user SMS factor in user preferences.
15
    When I follow "Preferences" in the user menu
16
    And I click on "Multi-factor authentication preferences" "link"
17
    And I click on "Set up" "button"
18
    And I set the field "Mobile number" to "+34649709233"
19
    And I press "Send code"
20
    And I set the field "Enter code" with valid code
21
    Then I press "Save"
22
 
23
  Scenario: Login user successfully with sms verification
24
    Given I log out
25
    And I log in as "admin"
26
    And I should see "2-step verification"
27
    And I should see "Enter code"
28
    When I set the field "Enter code" with valid code
29
    And I click on "Continue" "button"
30
    Then I am logged in as "admin"
31
 
32
  Scenario: Wrong code number end of possible attempts
33
    Given I log out
34
    And I log in as "admin"
35
    And I should see "2-step verification"
36
    And I should see "Enter code"
37
    When I set the field "Enter code" to "555556"
38
    And I click on "Continue" "button"
39
    And I should see "Wrong code."
40
    And I should see "You have 2 attempts left."
41
    And I set the field "Enter code" to "555553"
42
    And I click on "Continue" "button"
43
    And I should see "Wrong code."
44
    And I should see "1 attempts left."
45
    And I set the field "Enter code" to "555553"
46
    And I click on "Continue" "button"
47
    Then I should see "Unable to authenticate"