[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_block 2 Feature: Add and configure blocks throughout the site 3 In order to maintain some patterns across all the site 4 As a manager 5 I need to set and configure blocks throughout the site 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | category | 10 | Course 1 | C1 | 0 | 11 And the following "users" exist: 12 | username | firstname | lastname | email | 13 | manager1 | Manager | 1 | manager1@example.com | 14 | teacher1 | teacher | 1 | teacher@example.com | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 And the following "system role assigns" exist: 19 | user | course | role | 20 | manager1 | Acceptance test site | manager | 21 # Allow at least one role assignment in the block context: 22 And I log in as "admin" 23 And I navigate to "Define roles" node in "Site administration > Users > Permissions" 24 And I follow "Edit Non-editing teacher role" 25 And I set the following fields to these values: 26 | Block | 1 | 27 And I press "Save changes" 28 And I log out 29 30 Scenario: Add and configure a block throughtout the site 31 Given I log in as "manager1" 32 And I am on site homepage 33 And I follow "Turn editing on" 34 And I add the "Comments" block 35 And I configure the "Comments" block 36 And I set the following fields to these values: 37 | Page contexts | Display throughout the entire site | 38 And I press "Save changes" 39 When I follow "Course 1" 40 Then I should see "Comments" in the "Comments" "block" 41 And I should see "Save comment" in the "Comments" "block" 42 And I am on site homepage 43 And I configure the "Comments" block 44 And I set the following fields to these values: 45 | Default weight | -10 (first) | 46 And I press "Save changes" 47 And I follow "Course 1" 48 # The first block matching the pattern should be top-left block 49 And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element" 50 51 Scenario: Blocks on the dashboard page can have roles assigned to them 52 Given I log in as "manager1" 53 And I click on "Dashboard" "link" in the "Navigation" "block" 54 When I press "Customise this page" 55 Then I should see "Assign roles in Navigation block" 56 57 Scenario: Blocks on courses can have roles assigned to them 58 Given I log in as "teacher1" 59 And I follow "Course 1" 60 And I follow "Turn editing on" 61 Then I should see "Assign roles in Search forums block" 62 63 @javascript 64 Scenario: Blocks can safely be customised 65 Given I log in as "admin" 66 And I click on "Dashboard" "link" in the "Navigation" "block" 67 And I press "Customise this page" 68 And I add the "HTML" block 69 And I configure the "(new HTML block)" block 70 And I set the following fields to these values: 71 | Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" 72 | Content | Example 73 When I press "Save changes" 74 Then I should see "Course overview"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |