Commit | Line | Data |
---|---|---|
550d842e | 1 | @core @core_block |
7fcf94cb DM |
2 | Feature: Add and configure blocks throughout the site |
3 | In order to maintain some patterns across all the site | |
5d7b6307 | 4 | As a manager |
7fcf94cb DM |
5 | I need to set and configure blocks throughout the site |
6 | ||
7fcf94cb | 7 | Scenario: Add and configure a block throughtout the site |
759b323e | 8 | Given the following "courses" exist: |
7fcf94cb DM |
9 | | fullname | shortname | category | |
10 | | Course 1 | C1 | 0 | | |
759b323e | 11 | And the following "users" exist: |
7fcf94cb DM |
12 | | username | firstname | lastname | email | |
13 | | manager1 | Manager | 1 | manager1@asd.com | | |
759b323e | 14 | And the following "system role assigns" exist: |
7fcf94cb DM |
15 | | user | course | role | |
16 | | manager1 | Acceptance test site | manager | | |
17 | And I log in as "manager1" | |
18 | And I follow "Turn editing on" | |
19 | And I add the "Comments" block | |
3ee51425 | 20 | And I configure the "Comments" block |
f083d614 | 21 | And I set the following fields to these values: |
7fcf94cb DM |
22 | | Page contexts | Display throughout the entire site | |
23 | And I press "Save changes" | |
24 | When I follow "Course 1" | |
e9af3ed3 DM |
25 | Then I should see "Comments" in the "Comments" "block" |
26 | And I should see "Save comment" in the "Comments" "block" | |
7fcf94cb | 27 | And I am on homepage |
3ee51425 | 28 | And I configure the "Comments" block |
f083d614 | 29 | And I set the following fields to these values: |
7fcf94cb DM |
30 | | Default weight | -10 (first) | |
31 | And I press "Save changes" | |
32 | And I follow "Course 1" | |
33 | # The first block matching the pattern should be top-left block | |
5df9e40c | 34 | 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" |