AutorÃa | Ultima modificación | Ver Log |
@block @block_site_main_menuFeature: Add URL to main menu blockIn order to add helpful resources for studentsAs a adminI need to add URLs to the main menu block and check it works.Background:Given the following "courses" exist:| fullname | shortname | category | enablecompletion || Course 1 | C1 | 0 | 1 || Course 2 | C2 | 0 | |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || site_main_menu | System | 1 | site-index | side-pre |@javascriptScenario: Add a URL in menu block and ensure it appearsGiven I log in as "admin"And I am on site homepageAnd the following "activity" exists:| activity | url || course | Acceptance test site || name | reference link || intro | mooooooooodle || externalurl | http://www.moodle.com || section | 0 |When I am on the "reference link" "url activity editing" pageAnd I expand all fieldsetsAnd I set the following fields to these values:| id_display | In pop-up |And I press "Save and return to course"And I turn editing mode onThen "reference link" "link" should exist in the "Main menu" "block"And "Add an activity or resource" "button" should exist in the "Main menu" "block"@javascriptScenario: Add a URL in menu block can appear in the entire siteWhen I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I configure the "Main menu" blockAnd I set the following fields to these values:| Page contexts | Display throughout the entire site |And I press "Save changes"And the following "activity" exists:| activity | url || course | Acceptance test site || name | reference link || intro | mooooooooodle || externalurl | http://www.moodle.com || section | 0 |And I am on the "reference link" "url activity editing" pageAnd I expand all fieldsetsAnd I set the following fields to these values:| id_display | Embed |And I press "Save and return to course"Then I click on "reference link" "link" in the "Main menu" "block"And "reference link" "link" should exist in the "Main menu" "block"And I am on the "C1" "Course" pageAnd "reference link" "link" should exist in the "Main menu" "block"And I navigate to "Badges > Add a new badge" in site administrationAnd "reference link" "link" should exist in the "Main menu" "block"@javascriptScenario: Add a URL in menu block can appear in any front pageWhen I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I configure the "Main menu" blockAnd I set the following fields to these values:| Page contexts | Display on the site home and any pages added to the site home. |And I press "Save changes"And the following "activity" exists:| activity | url || course | Acceptance test site || name | reference link || intro | mooooooooodle || externalurl | http://www.moodle.com || section | 0 |And I am on the "reference link" "url activity editing" pageAnd I expand all fieldsetsAnd I set the following fields to these values:| id_display | Embed |And I press "Save and return to course"Then I click on "reference link" "link" in the "Main menu" "block"And "reference link" "link" should exist in the "Main menu" "block"And I am on the "C1" "Course" pageAnd "Main menu" "block" should not existAnd I navigate to "Badges > Add a new badge" in site administrationAnd "Main menu" "block" should not exist@javascriptScenario: When the "Main Menu" block is displayed throrought the entire site, adding an URL in a courseresults in adding it in the course and not in the frontpageGiven I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd I configure the "Main menu" blockAnd I set the following fields to these values:| Page contexts | Display throughout the entire site |And I press "Save changes"When the following "activity" exists:| activity | url || course | C2 || name | reference link || intro | mooooooooodle || externalurl | http://www.moodle.com || section | 0 || showdescription | 1 |And I am on the "reference link" "url activity editing" pageAnd I expand all fieldsetsAnd I set the following fields to these values:| id_display | In pop-up |And I press "Save and return to course"Then "reference link" "link" should not exist in the "Main menu" "block"And I should see "mooooooooodle" in the "region-main" "region"