Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_tag
2
Feature: Browsing tagged items
3
  In order to search by tag
4
  As a user
5
  I need to be able to browse tagged items
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email             | interests |
10
      | user1    | User      | 1        | user1@example.com | Cat       |
11
      | user2    | User      | 2        | user1@example.com | Cat, Dog  |
12
      | user3    | User      | 3        | user1@example.com | Dog       |
13
    And the following "courses" exist:
14
      | fullname  | shortname | tags     |
15
      | Course 1  | c1        | Cat, Dog |
16
      | Course 2  | c2        | Cat      |
17
      | Course 3  | c3        | Cat      |
18
      | Course 4  | c4        | Cat      |
19
      | Course 5  | c5        | Cat      |
20
      | Course 6  | c6        | Cat      |
21
      | Course 7  | c7        | Cat      |
22
 
23
  Scenario: Browse tag index with javascript disabled
24
    When I log in as "user1"
25
    And I turn editing mode on
26
    And the following config values are set as admin:
27
      | unaddableblocks | | theme_boost|
28
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
29
    And I add the "Navigation" block if not present
30
    And I click on "Tags" "link" in the "Navigation" "block"
31
    And I follow "Cat"
32
    Then I should see "Courses" in the ".tag-index-items h3" "css_element"
33
    And I should see "User 1" in the "#tagarea-core-user" "css_element"
34
    And I should see "Course 7"
35
    And I should see "Course 3"
36
    And I should not see "Course 2"
37
    And I should not see "Course 1"
38
    And I should see "User 1" in the "#tagarea-core-user" "css_element"
39
    And I should see "User 2"
40
    And I should not see "User 3"
41
    And I click on "More" "link" in the "#tagarea-core-course" "css_element"
42
    And I should see "Courses" in the "#tagarea-core-course" "css_element"
43
    And "#tagarea-core-user" "css_element" should not exist
44
    And I should not see "Course 7"
45
    And I should not see "Course 3"
46
    And I should see "Course 2"
47
    And I should see "Course 1"
48
    And I click on "Back" "link" in the "#tagarea-core-course" "css_element"
49
    And I should see "Courses" in the ".tag-index-items h3" "css_element"
50
    And "#tagarea-core-user" "css_element" should not exist
51
    And I should see "Course 7"
52
    And I should see "Course 3"
53
    And I should not see "Course 2"
54
    And I should not see "Course 1"
55
    And I follow "Show only tagged Courses"
56
    And I should see "Courses tagged with \"Cat\""
57
    And "#tagarea-core-user" "css_element" should not exist
58
    And I should see "Course 7"
59
    And I should see "Course 3"
60
    And I should see "Course 2"
61
    And I should see "Course 1"
62
    And I follow "Back to all items tagged with \"Cat\""
63
    And I should see "Courses" in the "#tagarea-core-course" "css_element"
64
    And I should see "User interests" in the "#tagarea-core-user" "css_element"
65
    And I should see "Course 7"
66
    And I should see "Course 3"
67
    And I should not see "Course2"
68
    And I should not see "Course1"
69
    And I log out
70
 
71
  @javascript
72
  Scenario: Browse tag index with javascript enabled
73
    When I log in as "user1"
74
    And I turn editing mode on
75
    And the following config values are set as admin:
76
      | unaddableblocks | | theme_boost|
77
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
78
    And I add the "Navigation" block if not present
79
    And I click on "Site pages" "list_item" in the "Navigation" "block"
80
    And I click on "Tags" "link" in the "Navigation" "block"
81
    And I follow "Cat"
82
    Then I should see "Courses" in the "#tagarea-core-course" "css_element"
83
    And I should see "User interests" in the "#tagarea-core-user" "css_element"
84
    And I should see "Course 7"
85
    And I should see "Course 3"
86
    And I should not see "Course 2"
87
    And I should not see "Course 1"
88
    And I click on "More" "link" in the "#tagarea-core-course" "css_element"
89
    And I should see "Courses" in the "#tagarea-core-course" "css_element"
90
    And I should see "User interests" in the "#tagarea-core-user" "css_element"
91
    And I should not see "Course 7"
92
    And I should not see "Course 3"
93
    And I should see "Course 2"
94
    And I should see "Course 1"
95
    And I click on "Back" "link" in the "#tagarea-core-course" "css_element"
96
    And I should see "Courses" in the "#tagarea-core-course" "css_element"
97
    And I should see "User interests" in the "#tagarea-core-user" "css_element"
98
    And I should see "Course 7"
99
    And I should see "Course 3"
100
    And I should not see "Course 2"
101
    And I should not see "Course 1"
102
    And I follow "Show only tagged Courses"
103
    And I should see "Courses" in the "#tagarea-core-course" "css_element"
104
    And "#tagarea-core-user" "css_element" should not exist
105
    And I should see "Course 7"
106
    And I should see "Course 3"
107
    And I should see "Course 2"
108
    And I should see "Course 1"
109
    And I follow "Back to all items tagged with \"Cat\""
110
    And I should see "Courses" in the "#tagarea-core-course" "css_element"
111
    And I should see "User interests" in the "#tagarea-core-user" "css_element"
112
    And I should see "Course 7"
113
    And I should see "Course 3"
114
    And I should not see "Course2"
115
    And I should not see "Course1"
116
    And I log out