Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_course_list
2
Feature: Enable the course_list block on the dashboard and view it's contents
3
  In order to enable the course list block on the dashboard
4
  As a user
5
  I can add the course list block to the dashboard
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 C  | CATB     | CATC     |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1        | 0        |
16
      | Course 2 | C2        | CATA     |
17
      | Course 3 | C3        | CATB     |
18
      | Course 4 | C4        | CATC     |
19
    And the following "users" exist:
20
      | username | firstname | lastname | email                |
21
      | teacher1 | Teacher   | First    | teacher1@example.com |
22
    And the following "course enrolments" exist:
23
      | user | course | role           |
24
      | teacher1 | C1 | editingteacher |
25
      | teacher1 | C2 | editingteacher |
26
      | teacher1 | C3 | editingteacher |
27
 
28
  Scenario: Add the course list block on the dashboard and navigate to the course listing
29
    Given I log in as "teacher1"
30
    And I turn editing mode on
31
    And the following config values are set as admin:
32
      | unaddableblocks | | theme_boost|
33
    When I add the "Courses" block
34
    Then I should see "Course 1" in the "My courses" "block"
35
    And I should see "Course 2" in the "My courses" "block"
36
    And I should see "Course 3" in the "My courses" "block"
37
    And I should not see "Course 4" in the "My courses" "block"
38
    And I follow "All courses"
39
    And I should see "Category 1"
40
 
41
  Scenario: Add the course list block on the dashboard and navigate to another course
42
    Given I log in as "teacher1"
43
    And I turn editing mode on
44
    And the following config values are set as admin:
45
      | unaddableblocks | | theme_boost|
46
    When I add the "Courses" block
47
    Then I should see "Course 1" in the "My courses" "block"
48
    And I should see "Course 2" in the "My courses" "block"
49
    And I should see "Course 3" in the "My courses" "block"
50
    And I should not see "Course 4" in the "My courses" "block"
51
    And I am on "Course 3" course homepage
52
    And I should see "Course 3"
53
 
54
  Scenario: Add the course list block on the dashboard and view as an admin
55
    Given I log in as "admin"
56
    And I turn editing mode on
57
    And the following config values are set as admin:
58
      | unaddableblocks | | theme_boost|
59
    When I add the "Courses" block
60
    Then I should see "Category 1" in the "Course categories" "block"
61
    And I should see "Category A" in the "Course categories" "block"
62
    And I should see "Category B" in the "Course categories" "block"
63
    And I should not see "Category C" in the "Course categories" "block"
64
    And I should not see "Course 1" in the "Course categories" "block"
65
    And I should not see "Course 2" in the "Course categories" "block"
66
    And I follow "All courses"
67
    And I should see "Category 1"