MDL-45294 behat: Updating block references to aria label value
[moodle.git] / blocks / tests / behat / configure_block_throughout_site.feature
CommitLineData
550d842e 1@core @core_block
7fcf94cb
DM
2Feature: 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
7 @javascript
8 Scenario: Add and configure a block throughtout the site
759b323e 9 Given the following "courses" exist:
7fcf94cb
DM
10 | fullname | shortname | category |
11 | Course 1 | C1 | 0 |
759b323e 12 And the following "users" exist:
7fcf94cb
DM
13 | username | firstname | lastname | email |
14 | manager1 | Manager | 1 | manager1@asd.com |
759b323e 15 And the following "system role assigns" exist:
7fcf94cb
DM
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
b100c4e3 21 And I open the "Comments" blocks action menu
7fcf94cb 22 And I follow "Configure Comments block"
f083d614 23 And I set the following fields to these values:
7fcf94cb
DM
24 | Page contexts | Display throughout the entire site |
25 And I press "Save changes"
26 When I follow "Course 1"
e9af3ed3
DM
27 Then I should see "Comments" in the "Comments" "block"
28 And I should see "Save comment" in the "Comments" "block"
7fcf94cb 29 And I am on homepage
b100c4e3 30 And I open the "Comments" blocks action menu
7fcf94cb 31 And I follow "Configure Comments block"
f083d614 32 And I set the following fields to these values:
7fcf94cb
DM
33 | Default weight | -10 (first) |
34 And I press "Save changes"
35 And I follow "Course 1"
36 # The first block matching the pattern should be top-left block
5df9e40c 37 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"