Proyectos de Subversion Moodle

Rev

| 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
20
    When I set the field "Edit title" in the "My forum name" "block_site_main_menu > Activity" to "New forum name"
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
41
    When I open "My forum name" actions menu in site main menu block
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.
45
    And I open "My forum name" actions menu in site main menu block
46
    And I click on "Edit settings" "link" in the "My forum name" activity in site main menu block
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"
52
    And "My forum name" activity in site main menu block should be available but hidden from course page
53
    And I turn editing mode off
54
    And "My forum name" activity in site main menu block should be available but hidden from course page
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"