source: moodle/trunk/fuentes/blocks/html/tests/behat/course_block.feature @ 136

Last change on this file since 136 was 136, checked in by mabarracus, 4 years ago

Ported code to xenial

File size: 1.5 KB
Line 
1@block @block_html
2Feature: HTML blocks in a course
3  In order to have one or multiple HTML blocks in a course
4  As a teacher
5  I need to be able to create and change such blocks
6
7  Scenario: Adding HTML block in a course
8    Given the following "users" exist:
9      | username | firstname | lastname | email            |
10      | teacher1 | Terry1    | Teacher1 | teacher@asd.com  |
11      | student1 | Sam1      | Student1 | student1@asd.com |
12    And the following "courses" exist:
13      | fullname | shortname |
14      | Course 1 | C1        |
15    And the following "course enrolments" exist:
16      | user     | course | role           |
17      | teacher1 | C1     | editingteacher |
18      | student1 | C1     | student        |
19    When I log in as "teacher1"
20    And I follow "Course 1"
21    And I turn editing mode on
22    And I add the "HTML" block
23    And I configure the "(new HTML block)" block
24    And I set the field "Content" to "First block content"
25    And I set the field "Block title" to "First block header"
26    And I press "Save changes"
27    And I add the "HTML" block
28    And I configure the "(new HTML block)" block
29    And I set the field "Content" to "Second block content"
30    And I set the field "Block title" to "Second block header"
31    And I press "Save changes"
32    And I log out
33    And I log in as "student1"
34    And I follow "Course 1"
35    And I should see "First block content" in the "First block header" "block"
36    And I should see "Second block content" in the "Second block header" "block"
Note: See TracBrowser for help on using the repository browser.