Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@auth @core_auth @javascript
2
Feature: Test if the login form provides the correct feedback
3
  In order to check if the login form provides correct feedback
4
  As a user
5
  I need to go on login page and see feedback on incorrect username or password.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username |
10
      | teacher1 |
11
 
12
  Scenario: Check invalid login message
13
    Given I follow "Log in"
14
    And I set the field "Username" to "teacher1"
15
    And I set the field "Password" to "incorrect"
16
    When I press "Log in"
17
    Then I should see "Invalid login, please try again"
18
 
19
  Scenario: Test login language selector
20
    Given remote langimport tests are enabled
21
    And the following "language packs" exist:
22
      | language |
23
      | nl       |
24
      | es       |
25
    And the following config values are set as admin:
26
      | langmenu | 1 |
27
    And I follow "Log in"
28
    And I open the action menu in "region-main" "region"
29
    # The line below contains the unicode character U+200E before and after the brackets, please be very careful editing this line.
30
    When I choose "Nederlands ‎(nl)‎" in the open action menu
31
    Then I should see "Gebruikersnaam"
32
 
33
  @_file_upload
34
  Scenario: Set logo for loginpage
35
    Given I log in as "admin"
36
    And I navigate to "Appearance > Logos" in site administration
37
    And I upload "course/tests/fixtures/image.jpg" file to "Logo" filemanager
38
    And I press "Save changes"
39
    And I log out
40
    And I follow "Log in"
41
    Then "//img[@id='logoimage']" "xpath_element" should exist
42
 
43
  Scenario: Add a custom welcome message
44
    Given the following config values are set as admin:
45
      | auth_instructions | Lorem ipsum dolor sit amet |
46
    And I follow "Log in"
47
    Then I should see "Lorem ipsum dolor sit amet"
48
 
1441 ariadna 49
  @javascript @accessibility
1 efrain 50
  Scenario: Show the maintenance mode message
51
    Given the following config values are set as admin:
1441 ariadna 52
      | maintenance_enabled | 1                     |
53
      | maintenance_message | Back online tomorrow  |
1 efrain 54
    And I follow "Log in"
55
    Then I should see "Back online tomorrow"
1441 ariadna 56
    And the page should meet accessibility standards with "best-practice" extra tests
1 efrain 57
 
58
  Scenario: User self registration
59
    Given the following config values are set as admin:
60
      | registerauth | Email-based self-registration |
61
    And I follow "Log in"
62
    Then I should see "Create new account"
63
 
64
  Scenario: Set OAuth providers
65
    Given I log in as "admin"
66
    And I navigate to "Plugins > Authentication > Manage authentication" in site administration
67
    And I click on "Enable" "link" in the "OAuth 2" "table_row"
68
    And I navigate to "Server > OAuth 2 services" in site administration
69
    And I press "Google"
70
    And I set the field "Client ID" to "1234"
71
    And I set the field "Client secret" to "1234"
72
    And I press "Save changes"
73
    And I press "Facebook"
74
    And I set the field "Client ID" to "1234"
75
    And I set the field "Client secret" to "1234"
76
    And I press "Save changes"
77
    And I press "Microsoft"
78
    And I set the field "Client ID" to "1234"
79
    And I set the field "Client secret" to "1234"
80
    And I press "Save changes"
81
    And I log out
82
    And I follow "Log in"
83
    Then I should see "Google"
84
    And I should see "Facebook"
85
    And I should see "Microsoft"
86
 
87
  Scenario: Test the login page auto focus feature
88
    Given the following config values are set as admin:
89
      | loginpageautofocus | Enabled |
90
    And I follow "Log in"
91
    Then the focused element is "Username" "field"
92
    And I set the field "Username" to "admin"
93
    And I set the field "Password" to "admin"
94
    And I press "Log in"
95
    And I log out
96
    And I follow "Log in"
97
    Then the focused element is "Password" "field"
98
 
99
  Scenario: Test the login page focus after error feature
100
    Given I follow "Log in"
101
    And I set the field "Username" to "admin"
102
    And I set the field "Password" to "wrongpassword"
103
    And I press "Log in"
104
    And I press the tab key
105
    Then the focused element is "Username" "field"
106
 
107
  Scenario: Display the password visibility toggle icon
108
    Given the following config values are set as admin:
109
      | loginpasswordtoggle | 1 |
110
    When I follow "Log in"
111
    Then "Toggle sensitive" "button" should be visible
112
    And the following config values are set as admin:
113
      | loginpasswordtoggle | 0 |
114
    And I reload the page
115
    And "Toggle sensitive" "button" should not be visible
116
 
117
  Scenario: Display the password visibility toggle icon for small screens only
118
    Given the following config values are set as admin:
119
      | loginpasswordtoggle | 2 |
120
    When I follow "Log in"
121
    Then "Toggle sensitive" "button" should not be visible
122
    And I change the viewport size to "mobile"
123
    And "Toggle sensitive" "button" should be visible