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
@enrol @enrol_guest
2
Feature: Guest users can auto-enrol themself in courses where guest access is allowed
3
  In order to access courses contents
4
  As a guest
5
  I need to access courses as a guest
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | format |
14
      | Course 1 | C1 | topics |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
    And the following "activity" exists:
19
      | activity                      | forum                  |
20
      | course                        | C1                     |
21
      | idnumber                      | 0001                   |
22
      | name                          | Test forum name        |
23
    And I am on the "Course 1" "enrolment methods" page logged in as teacher1
24
 
25
  Scenario: Allow guest access without password
26
    Given I click on "Edit" "link" in the "Guest access" "table_row"
27
    And I set the following fields to these values:
28
      | Allow guest access | Yes |
29
    And I press "Save changes"
30
    When I am on the "Test forum name" "forum activity" page logged in as student1
31
    Then I should not see "Subscribe to this forum"
32
 
1441 ariadna 33
  @javascript
1 efrain 34
  Scenario: Allow guest access with password
35
    Given I click on "Edit" "link" in the "Guest access" "table_row"
36
    And I set the following fields to these values:
37
      | Allow guest access | Yes |
38
      | Password | moodle_rules |
39
    And I press "Save changes"
40
    When I am on the "Course 1" course page logged in as student1
41
    Then I should see "Guest access"
1441 ariadna 42
    And I press "Access as a guest"
1 efrain 43
    And I set the following fields to these values:
44
      | Password | moodle_rules |
1441 ariadna 45
    And I click on "Access as a guest" "button" in the "Guest access" "dialogue"
1 efrain 46
    And I should see "Test forum name"