Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_auth
2
Feature: Authentication
3
  In order to validate my credentials in the system
4
  As a user
5
  I need to log into the system
6
 
7
  Scenario: Log in with the predefined admin user with Javascript disabled
8
    Given I log in as "admin"
9
    Then I should see "You are logged in as Admin User" in the "page-footer" "region"
10
 
11
  @javascript
12
  Scenario: Log in with the predefined admin user with Javascript enabled
13
    Given I log in as "admin"
14
    Then I should see "You are logged in as Admin User" in the "page-footer" "region"
15
 
16
  Scenario: Log in as an existing admin user filling the form
17
    Given the following "users" exist:
18
      | username | password | firstname | lastname | email |
19
      | testuser | testuser | Test | User | moodle@example.com |
20
    And I am on site homepage
21
    When I follow "Log in"
22
    And I set the field "Username" to "testuser"
23
    And I set the field "Password" to "testuser"
24
    And I press "Log in"
25
    Then I should see "You are logged in as" in the "page-footer" "region"
26
 
27
  Scenario: Log in as an unexisting user filling the form
28
    Given the following "users" exist:
29
      | username | password | firstname | lastname | email |
30
      | testuser | testuser | Test | User | moodle@example.com |
31
    And I am on site homepage
32
    When I follow "Log in"
33
    And I set the field "Username" to "testuser"
34
    And I set the field "Password" to "unexisting"
35
    And I press "Log in"
36
    Then I should see "Invalid login, please try again"
37
 
38
  Scenario: Log out using the Log out link
39
    Given I log in as "admin"
40
    When I click on "Log out" "link" in the "#page-footer" "css_element"
41
    Then I should see "You are not logged in" in the "page-footer" "region"
42
 
43
  @javascript @accessibility
44
  Scenario: Login page must be accessible
45
    When I am on site homepage
46
    # The following tests are all provided to ensure that the accessibility tests themselves are tested.
47
    # In normal tests only one of the following is required.
48
    Then the page should meet accessibility standards
49
    And the page should meet "wcag131, wcag141, wcag412" accessibility standards
50
    And the page should meet accessibility standards with "wcag131, wcag141, wcag412" extra tests
51
 
52
    And I follow "Log in"
53
    And the page should meet accessibility standards
54
    And the page should meet "wcag131, wcag141, wcag412" accessibility standards
55
    And the page should meet accessibility standards with "wcag131, wcag141, wcag412" extra tests
56
 
57
  @javascript @accessibility
58
  Scenario: The login page must have sufficient colour contrast
59
    Given the following config values are set as admin:
60
      | custommenuitems | -This is a custom item\|/customurl/ |
61
    When I am on site homepage
62
    Then the page should meet "wcag143" accessibility standards
63
    And the page should meet accessibility standards with "wcag143" extra tests
64
 
65
  Scenario: Alternate login URL can be bypassed
66
    Given the following config values are set as admin:
67
        | alternateloginurl | https://www.google.com/ |
68
    And I am on site homepage
69
    When I visit "/login/index.php?loginredirect=0"
70
    Then I should see "Log in to Acceptance test site"