MDL-38615 behat: New test
[moodle.git] / blocks / tests / behat / configure_block_throughout_site.feature
CommitLineData
7fcf94cb
DM
1@blocks @admin
2Feature: Add and configure blocks throughout the site
3 In order to maintain some patterns across all the site
4 As a moodle manager
5 I need to set and configure blocks throughout the site
6
7 @javascript
8 Scenario: Add and configure a block throughtout the site
9 Given the following "courses" exists:
10 | fullname | shortname | category |
11 | Course 1 | C1 | 0 |
12 And the following "users" exists:
13 | username | firstname | lastname | email |
14 | manager1 | Manager | 1 | manager1@asd.com |
15 And the following "system role assigns" exists:
16 | user | course | role |
17 | manager1 | Acceptance test site | manager |
18 And I log in as "manager1"
19 And I follow "Turn editing on"
20 And I add the "Comments" block
21 And I follow "Configure Comments block"
22 And I fill the moodle form with:
23 | Page contexts | Display throughout the entire site |
24 And I press "Save changes"
25 When I follow "Course 1"
26 Then I should see "Comments"
27 And I should see "Save comment"
28 And I am on homepage
29 And I follow "Configure Comments block"
30 And I fill the moodle form with:
31 | Default weight | -10 (first) |
32 And I press "Save changes"
33 And I follow "Course 1"
34 # The first block matching the pattern should be top-left block
35 And I should see "Comments" in the "//*[@id='region-pre']/descendant::div[contains(concat(' ', @class, ' '), ' block ')]" "xpath_element"