1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-31 05:52:51 +02:00
moodle/my/tests/behat/add_blocks.feature
Frederic Massart da45dc0497 MDL-47189 my: Update test to check that existing blocks remain after add
Specifically checking for strings in the blocks because the tests
passed when looking for the string anywhere.
2014-10-14 16:03:12 +08:00

28 lines
1.1 KiB
Gherkin

@core @core_my
Feature: Add blocks to my home page
In order to add more functionality to my home page
As a user
I need to add blocks to my home page
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "student1"
And I click on "My home" "link" in the "Navigation" "block"
Scenario: Add blocks to page
When I press "Customise this page"
And I add the "Latest news" block
Then I should see "Latest news" in the "Latest news" "block"
And I should see "My latest badges" in the "My latest badges" "block"
And I should see "Calendar" in the "Calendar" "block"
And I should see "Upcoming events" in the "Upcoming events" "block"