Rev 1 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
@block @block_site_main_menuFeature: Edit activities in main menu blockIn order to use main menu blockAs an adminI need to add and edit activities there@javascriptScenario: Edit name of acitivity in-place in site main menu blockGiven the following "activity" exists:| activity | forum || course | Acceptance test site || name | My forum name || idnumber | forum |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And I log in as "admin"And I am on site homepageAnd I turn editing mode onWhen I set the field "Edit title" in the "My forum name" "activity" to "New forum name"Then I should not see "My forum name"And I should see "New forum name"And I follow "New forum name"And I should not see "My forum name"And I should see "New forum name"@javascriptScenario: Activities in main menu block can be made available but not visible on a course pageGiven the following config values are set as admin:| allowstealth | 1 |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And the following "activities" exist:| activity | course | section | name || forum | Acceptance test site | 0 | Visible forum || forum | Acceptance test site | 0 | My forum name |And I log in as "admin"And I am on site homepageAnd I turn editing mode onWhen I open "My forum name" actions menuAnd I choose "Availability > Make available but don't show on course page" in the open action menuThen I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"# Make sure that "Availability" dropdown in the edit menu has three options.And I open "My forum name" actions menuAnd I choose "Edit settings" in the open action menuAnd I expand all fieldsetsAnd the "Availability" select box should contain "Show on course page"And the "Availability" select box should contain "Hide on course page"And the field "Availability" matches value "Make available but don't show on course page"And I press "Save and return to course"And I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"And I turn editing mode offAnd I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"And I log outAnd I should not see "My forum name" in the "Main menu" "block"And I should see "Visible forum" in the "Main menu" "block"@javascriptScenario: The move activity modal allow to move from the main menu block to the main contentGiven the following "activity" exists:| activity | forum || course | Acceptance test site || name | My forum name || idnumber | forum |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I should see "My forum name" in the "block_site_main_menu_section" "region"And I should not see "My forum name" in the "region-main" "region"When I open "My forum name" actions menuAnd I click on "Move" "link" in the "My forum name" activityAnd I should see "My forum name" in the "Move activity" "dialogue"And I should see "Block" in the "Move activity" "dialogue"And I should see "Site" in the "Move activity" "dialogue"And I click on "Site" "link" in the "Move activity" "dialogue"Then I should see "My forum name" in the "region-main" "region"And I should not see "My forum name" in the "block_site_main_menu_section" "region"@javascriptScenario: The move activity modal allow to move from the main content to the main menu blockGiven the following "activity" exists:| activity | forum || course | Acceptance test site || name | My forum name || idnumber | forum || section | 1 |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I should not see "My forum name" in the "block_site_main_menu_section" "region"And I should see "My forum name" in the "region-main" "region"When I open "My forum name" actions menuAnd I click on "Move" "link" in the "My forum name" activityAnd I should see "My forum name" in the "Move activity" "dialogue"And I should see "Block" in the "Move activity" "dialogue"And I should see "Site" in the "Move activity" "dialogue"And I click on "Block" "link" in the "Move activity" "dialogue"Then I should not see "My forum name" in the "region-main" "region"And I should see "My forum name" in the "block_site_main_menu_section" "region"@javascriptScenario: Admin can delete an activity in the main menu blockGiven the following "activity" exists:| activity | forum || course | Acceptance test site || name | My forum name || idnumber | forum |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I should see "My forum name" in the "block_site_main_menu_section" "region"When I open "My forum name" actions menuAnd I choose "Delete" in the open action menuAnd I click on "Delete" "button" in the "Delete activity?" "dialogue"Then I should not see "My forum name" in the "block_site_main_menu_section" "region"@javascriptScenario: Admin can duplicate an activity in the main menu blockGiven the following "activity" exists:| activity | forum || course | Acceptance test site || name | My forum name || idnumber | forum |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I should see "My forum name" in the "block_site_main_menu_section" "region"When I open "My forum name" actions menuAnd I choose "Duplicate" in the open action menuThen I should see "My forum name (copy)" in the "block_site_main_menu_section" "region"@javascriptScenario: Admin can move right and left an activity in the main menu blockGiven the following "activity" exists:| activity | forum || course | Acceptance test site || name | My forum name || idnumber | forum |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |And I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I should see "My forum name" in the "block_site_main_menu_section" "region"When I open "My forum name" actions menuAnd "Move right" "link" should be visibleAnd "Move left" "link" should not be visibleAnd I choose "Move right" in the open action menuThen I open "My forum name" actions menuAnd "Move right" "link" should not be visibleAnd "Move left" "link" should be visibleAnd I choose "Move left" in the open action menuAnd I open "My forum name" actions menuAnd "Move right" "link" should be visibleAnd "Move left" "link" should not be visible