Merge branch 'm28_MDL-46325' of git://github.com/totara/moodle
[moodle.git] / blocks / course_summary / tests / behat / block_course_summary_frontpage.feature
CommitLineData
e1850856
DP
1@block @block_course_summary
2Feature: Course summary block used on the frontpage
3 In order to help particpants know the summary of a site
4 As admin
5 I can use the course summary block on the frontpage
6
7 Background:
8 Given I log in as "admin"
9 And I navigate to "Edit settings" node in "Front page settings"
10 And I set the following fields to these values:
11 | summary | Proved the summary block works! |
12 And I press "Save changes"
13 And I log out
14 # The course summary block a default front page block, so no need to add it.
15
16 Scenario: Guest can view site summary
17 When I am on homepage
28c86221
DM
18 Then "Course/site summary" "block" should exist
19 And I should see "Proved the summary block works!" in the "Course/site summary" "block"
e1850856
DP
20
21 Scenario: Admin can see an edit icon when edit mode is on and follow it to the front page settings
22 When I log in as "admin"
23 And I am on homepage
24 And I follow "Turn editing on"
28c86221
DM
25 Then I should see "Proved the summary block works!" in the "Course/site summary" "block"
26 And I click on "Edit" "link" in the "Course/site summary" "block"
e1850856
DP
27 Then I should see "Front page settings" in the "h2" "css_element"
28
29 Scenario: Admin can not see edit icon when edit mode is off
3040963b 30 When I log in as "admin"
e1850856 31 And I am on homepage
28c86221
DM
32 Then I should see "Proved the summary block works!" in the "Course/site summary" "block"
33 And "Edit" "link" should not exist in the "Course/site summary" "block"