Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course
2
Feature: Site home displays items in different modes
3
  In order to show a clean and clear list of the site categories and course
4
  As an admin
5
  I need to set different frontpage display modes
6
 
7
  Background:
8
    Given the following "categories" exist:
9
      | name                   | category | idnumber |
10
      | Category A             | 0        | CATA     |
11
      | Category B             | 0        | CATB     |
12
      | Category A child       | CATA     | CATA1    |
13
      | Category B child       | CATB     | CATB1    |
14
      | Category A child child | CATA1    | CATA11   |
15
      | Category C             | 0        | CATC     |
16
    And the following "courses" exist:
17
      | fullname     | shortname   | category |
18
      | Course 1 1   | COURSE1_1   | CATA     |
19
      | Course 2 1   | COURSE2_1   | CATB     |
20
      | Course 11 1  | COURSE11_1  | CATA1    |
21
      | Course 2 2   | COURSE2_2   | CATB     |
22
      | Course 21 1  | COURSE21_1  | CATB1    |
23
      | Course 111 1 | COURSE111_1 | CATA11   |
24
      | Course 111 2 | COURSE111_2 | CATA11   |
25
    And I log in as "admin"
26
 
27
  @javascript
28
  Scenario: Displays a list of categories
29
    When I set the following administration settings values:
30
      | Site home items when logged in | List of categories |
31
      | Maximum category depth | 2 |
32
    And I am on site homepage
33
    Then I should see "Category A" in the "region-main" "region"
34
    And I should see "Category A child" in the "region-main" "region"
35
    And I should not see "Category A child child" in the "region-main" "region"
36
    And I toggle "Category A" category children visibility in frontpage
37
    And I should not see "Category A child" in the "region-main" "region"
38
    And I toggle "Category A" category children visibility in frontpage
39
    And I should see "Category A child" in the "region-main" "region"
40
    And I toggle "Category A child" category children visibility in frontpage
41
    And I should see "Category A child child" in the "region-main" "region"
42
 
43
  @javascript
44
  Scenario: Displays a combo list
45
    When I set the following administration settings values:
46
      | Site home items when logged in | Combo list |
47
      | Maximum category depth | 2 |
48
    And I am on site homepage
49
    Then I should see "Category A" in the "region-main" "region"
50
    And I should see "Category A child" in the "region-main" "region"
51
    And I should not see "Category A child child" in the "region-main" "region"
52
    And I should see "Course 1 1" in the "region-main" "region"
53
    And I should see "Course 2 2" in the "region-main" "region"
54
    And I should not see "Course 11 1" in the "region-main" "region"
55
    And I toggle "Category A child" category children visibility in frontpage
56
    And I should see "Course 11 1" in the "region-main" "region"
57
    And I should see "Category A child child" in the "region-main" "region"
58
    And I toggle "Category A" category children visibility in frontpage
59
    And I should not see "Course 1 1" in the "region-main" "region"
60
    And I should not see "Category A child" in the "region-main" "region"
61
    And I toggle "Category A" category children visibility in frontpage
62
    And I should see "Course 11 1" in the "region-main" "region"
63
 
64
  Scenario: Displays Enrolled users in frontpage
65
    Given the following "users" exist:
66
      | username | firstname | lastname | email           | profile_field_frog |
67
      | user1    | User      | One      | one@example.com | Kermit             |
68
    And the following "course enrolments" exist:
69
      | user  | course       | role    |
70
      | admin | COURSE1_1    | student |
71
      | admin | COURSE2_1    | student |
72
      | admin | COURSE2_2    | student |
73
    And I set the following administration settings values:
74
      | Site home items when logged in | Enrolled courses |
75
      | frontpagecourselimit           | 2                |
76
    And I log in as "admin"
77
    And I am on site homepage
78
    When I click on "My courses" "link" in the "frontpage-course-list" "region"
79
    Then I should see "My courses" in the "page-header" "region"