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
@block @block_site_main_menu
2
Feature: Edit activities in main menu block
3
  In order to use main menu block
4
  As an admin
5
  I need to add and edit activities there
6
 
7
  @javascript
8
  Scenario: Edit name of acitivity in-place in site main menu block
9
    Given the following "activity" exists:
10
      | activity | forum                |
11
      | course   | Acceptance test site |
12
      | name     | My forum name        |
13
      | idnumber | forum                |
14
    And the following "blocks" exist:
15
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
16
      | site_main_menu | System       | 1         | site-index      | side-pre      |
17
    And I log in as "admin"
18
    And I am on site homepage
19
    And I turn editing mode on
1441 ariadna 20
    When I set the field "Edit title" in the "My forum name" "activity" to "New forum name"
1 efrain 21
    Then I should not see "My forum name"
22
    And I should see "New forum name"
23
    And I follow "New forum name"
24
    And I should not see "My forum name"
25
    And I should see "New forum name"
26
 
27
  @javascript
28
  Scenario: Activities in main menu block can be made available but not visible on a course page
29
    Given the following config values are set as admin:
30
      | allowstealth | 1 |
31
    And the following "blocks" exist:
32
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
33
      | site_main_menu | System       | 1         | site-index      | side-pre      |
34
    And the following "activities" exist:
35
      | activity | course               | section | name          |
36
      | forum    | Acceptance test site | 0       | Visible forum |
37
      | forum    | Acceptance test site | 0       | My forum name |
38
    And I log in as "admin"
39
    And I am on site homepage
40
    And I turn editing mode on
1441 ariadna 41
    When I open "My forum name" actions menu
1 efrain 42
    And I choose "Availability > Make available but don't show on course page" in the open action menu
43
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
44
    # Make sure that "Availability" dropdown in the edit menu has three options.
1441 ariadna 45
    And I open "My forum name" actions menu
46
    And I choose "Edit settings" in the open action menu
1 efrain 47
    And I expand all fieldsets
48
    And the "Availability" select box should contain "Show on course page"
49
    And the "Availability" select box should contain "Hide on course page"
50
    And the field "Availability" matches value "Make available but don't show on course page"
51
    And I press "Save and return to course"
1441 ariadna 52
    And I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
1 efrain 53
    And I turn editing mode off
1441 ariadna 54
    And I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
1 efrain 55
    And I log out
56
    And I should not see "My forum name" in the "Main menu" "block"
57
    And I should see "Visible forum" in the "Main menu" "block"
1441 ariadna 58
 
59
  @javascript
60
  Scenario: The move activity modal allow to move from the main menu block to the main content
61
    Given the following "activity" exists:
62
      | activity | forum                |
63
      | course   | Acceptance test site |
64
      | name     | My forum name        |
65
      | idnumber | forum                |
66
    And the following "blocks" exist:
67
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
68
      | site_main_menu | System       | 1         | site-index      | side-pre      |
69
    And I log in as "admin"
70
    And I am on site homepage
71
    And I turn editing mode on
72
    And I should see "My forum name" in the "block_site_main_menu_section" "region"
73
    And I should not see "My forum name" in the "region-main" "region"
74
    When I open "My forum name" actions menu
75
    And I click on "Move" "link" in the "My forum name" activity
76
    And I should see "My forum name" in the "Move activity" "dialogue"
77
    And I should see "Block" in the "Move activity" "dialogue"
78
    And I should see "Site" in the "Move activity" "dialogue"
79
    And I click on "Site" "link" in the "Move activity" "dialogue"
80
    Then I should see "My forum name" in the "region-main" "region"
81
    And I should not see "My forum name" in the "block_site_main_menu_section" "region"
82
 
83
  @javascript
84
  Scenario: The move activity modal allow to move from the main content to the main menu block
85
    Given the following "activity" exists:
86
      | activity | forum                |
87
      | course   | Acceptance test site |
88
      | name     | My forum name        |
89
      | idnumber | forum                |
90
      | section  | 1                    |
91
    And the following "blocks" exist:
92
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
93
      | site_main_menu | System       | 1         | site-index      | side-pre      |
94
    And I log in as "admin"
95
    And I am on site homepage
96
    And I turn editing mode on
97
    And I should not see "My forum name" in the "block_site_main_menu_section" "region"
98
    And I should see "My forum name" in the "region-main" "region"
99
    When I open "My forum name" actions menu
100
    And I click on "Move" "link" in the "My forum name" activity
101
    And I should see "My forum name" in the "Move activity" "dialogue"
102
    And I should see "Block" in the "Move activity" "dialogue"
103
    And I should see "Site" in the "Move activity" "dialogue"
104
    And I click on "Block" "link" in the "Move activity" "dialogue"
105
    Then I should not see "My forum name" in the "region-main" "region"
106
    And I should see "My forum name" in the "block_site_main_menu_section" "region"
107
 
108
  @javascript
109
  Scenario: Admin can delete an activity in the main menu block
110
    Given the following "activity" exists:
111
      | activity | forum                |
112
      | course   | Acceptance test site |
113
      | name     | My forum name        |
114
      | idnumber | forum                |
115
    And the following "blocks" exist:
116
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
117
      | site_main_menu | System       | 1         | site-index      | side-pre      |
118
    And I log in as "admin"
119
    And I am on site homepage
120
    And I turn editing mode on
121
    And I should see "My forum name" in the "block_site_main_menu_section" "region"
122
    When I open "My forum name" actions menu
123
    And I choose "Delete" in the open action menu
124
    And I click on "Delete" "button" in the "Delete activity?" "dialogue"
125
    Then I should not see "My forum name" in the "block_site_main_menu_section" "region"
126
 
127
  @javascript
128
  Scenario: Admin can duplicate an activity in the main menu block
129
    Given the following "activity" exists:
130
      | activity | forum                |
131
      | course   | Acceptance test site |
132
      | name     | My forum name        |
133
      | idnumber | forum                |
134
    And the following "blocks" exist:
135
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
136
      | site_main_menu | System       | 1         | site-index      | side-pre      |
137
    And I log in as "admin"
138
    And I am on site homepage
139
    And I turn editing mode on
140
    And I should see "My forum name" in the "block_site_main_menu_section" "region"
141
    When I open "My forum name" actions menu
142
    And I choose "Duplicate" in the open action menu
143
    Then I should see "My forum name (copy)" in the "block_site_main_menu_section" "region"
144
 
145
  @javascript
146
  Scenario: Admin can move right and left an activity in the main menu block
147
    Given the following "activity" exists:
148
      | activity | forum                |
149
      | course   | Acceptance test site |
150
      | name     | My forum name        |
151
      | idnumber | forum                |
152
    And the following "blocks" exist:
153
      | blockname      | contextlevel | reference | pagetypepattern | defaultregion |
154
      | site_main_menu | System       | 1         | site-index      | side-pre      |
155
    And I log in as "admin"
156
    And I am on site homepage
157
    And I turn editing mode on
158
    And I should see "My forum name" in the "block_site_main_menu_section" "region"
159
    When I open "My forum name" actions menu
160
    And "Move right" "link" should be visible
161
    And "Move left" "link" should not be visible
162
    And I choose "Move right" in the open action menu
163
    Then I open "My forum name" actions menu
164
    And "Move right" "link" should not be visible
165
    And "Move left" "link" should be visible
166
    And I choose "Move left" in the open action menu
167
    And I open "My forum name" actions menu
168
    And "Move right" "link" should be visible
169
    And "Move left" "link" should not be visible