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
@core @core_course
2
Feature: We can change the visibility of courses in the management interface.
3
  As a moodle admin
4
  I need to test hiding and then showing a course.
5
  I need to test hiding a course and then hiding and showing the category its within.
6
 
7
  # Test hiding and showing a course.
8
  Scenario: Test toggling course visibility through the management interfaces.
9
    Given the following "categories" exist:
10
      | name | category | idnumber |
11
      | Cat 1 | 0 | CAT1 |
12
    And the following "courses" exist:
13
      | category | fullname | shortname | idnumber |
14
      | CAT1 | Course 1 | Course 1 | C1 |
15
 
16
    And I log in as "admin"
17
    And I go to the courses management page
18
    And I should see the "Course categories and courses" management page
19
    And I click on category "Cat 1" in the management interface
20
    # Redirect.
21
    And I should see the "Course categories and courses" management page
22
    And I should see "Cat 1" in the "#category-listing ul" "css_element"
23
    And I should see "Course 1" in the "#course-listing ul.course-list" "css_element"
24
    And category in management listing should be visible "CAT1"
25
    And course in management listing should be visible "C1"
26
    And I toggle visibility of course "C1" in management listing
27
    # Redirect.
28
    And I should see the "Course categories and courses" management page with a course selected
29
    And category in management listing should be visible "CAT1"
30
    And course in management listing should be dimmed "C1"
31
    And I toggle visibility of course "C1" in management listing
32
    # Redirect.
33
    And I should see the "Course categories and courses" management page with a course selected
34
    And category in management listing should be visible "CAT1"
35
    And course in management listing should be visible "C1"
36
    And I toggle visibility of course "C1" in management listing
37
    # Redirect.
38
    And I should see the "Course categories and courses" management page with a course selected
39
    And category in management listing should be visible "CAT1"
40
    And course in management listing should be dimmed "C1"
41
    And I toggle visibility of category "CAT1" in management listing
42
    # Redirect.
43
    And I should see the "Course categories and courses" management page
44
    And category in management listing should be dimmed "CAT1"
45
    And course in management listing should be dimmed "C1"
46
    And I toggle visibility of category "CAT1" in management listing
47
    # Redirect.
48
    And I should see the "Course categories and courses" management page
49
    And category in management listing should be visible "CAT1"
50
    And course in management listing should be dimmed "C1"
51
    And I toggle visibility of category "CAT1" in management listing
52
 
53
  # Test hiding and showing a course with JS, same as the above test.
54
  @javascript
55
  Scenario: Test using AJAX to hide a course through the management interfaces.
56
    Given the following "categories" exist:
57
      | name | category | idnumber |
58
      | Cat 1 | 0 | CAT1 |
59
    And the following "courses" exist:
60
      | category | fullname | shortname | idnumber |
61
      | CAT1 | Course 1 | Course 1 | C1 |
62
 
63
    And I log in as "admin"
64
    And I go to the courses management page
65
    And I start watching to see if a new page loads
66
    And I should see the "Course categories and courses" management page
67
    And I click on category "Cat 1" in the management interface
68
    And a new page should have loaded since I started watching
69
    And I start watching to see if a new page loads
70
    And I should see the "Course categories and courses" management page
71
    And I should see "Cat 1" in the "#category-listing ul" "css_element"
72
    And I should see "Course 1" in the "#course-listing ul.course-list" "css_element"
73
    And category in management listing should be visible "CAT1"
74
    And course in management listing should be visible "C1"
75
    And I toggle visibility of course "C1" in management listing
76
    And a new page should not have loaded since I started watching
77
    And category in management listing should be visible "CAT1"
78
    And course in management listing should be dimmed "C1"
79
    And I toggle visibility of course "C1" in management listing
80
    And a new page should not have loaded since I started watching
81
    And category in management listing should be visible "CAT1"
82
    And course in management listing should be visible "C1"
83
    And I toggle visibility of course "C1" in management listing
84
    And a new page should not have loaded since I started watching
85
    And category in management listing should be visible "CAT1"
86
    And course in management listing should be dimmed "C1"
87
    And I toggle visibility of category "CAT1" in management listing
1441 ariadna 88
    And I click on "Hide" "button" in the "Hide category?" "dialogue"
1 efrain 89
    And a new page should not have loaded since I started watching
90
    And category in management listing should be dimmed "CAT1"
91
    And course in management listing should be dimmed "C1"
92
    And I toggle visibility of category "CAT1" in management listing
93
    And a new page should not have loaded since I started watching
94
    And category in management listing should be visible "CAT1"
95
    And course in management listing should be dimmed "C1"
96
    And I toggle visibility of category "CAT1" in management listing
1441 ariadna 97
    And I click on "Hide" "button" in the "Hide category?" "dialogue"
1 efrain 98
    And I toggle visibility of course "C1" in management listing
99
    And I select "Courses" from the "Viewing" singleselect
100
    And a new page should have loaded since I started watching
101
    And I start watching to see if a new page loads
102
    And I should see "Course 1" in the "#course-listing ul.course-list" "css_element"
103
    And I toggle visibility of course "C1" in management listing
104
    And a new page should not have loaded since I started watching
105
    And course in management listing should be dimmed "C1"
106
    And I toggle visibility of course "C1" in management listing
107
    And course in management listing should be visible "C1"
108
    And a new page should not have loaded since I started watching