AutorÃa | Ultima modificación | Ver Log |
@block @block_blog_menu @block_blog_recentFeature: Students can use the recent blog entries block to view recent entries on a course pageIn order to enable the recent blog entries block a course pageAs a teacherI can add the recent blog entries block to a course pageBackground:Given the following "users" exist:| username | firstname | lastname | email | idnumber || student1 | Student | 1 | student1@example.com | S1 || teacher1 | Teacher | 1 | teacher1@example.com | T1 |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || blog_menu | Course | C1 | course-view-* | side-pre || blog_recent | Course | C1 | course-view-* | side-pre |And the "multilang" filter is "on"And the "multilang" filter applies to "content and headings"Scenario: Students use the recent blog entries block to view blogsGiven I am on the "Course 1" course page logged in as student1And I follow "Add an entry about this course"When I set the following fields to these values:| Entry title | S1 First Blog <span lang="RU" class="multilang">RUSSIAN</span><span lang="EN" class="multilang">ENGLISH</span> || Blog entry body | This is my awesome blog! |And I press "Save changes"Then I should see "S1 First Blog ENGLISH"And I should see "This is my awesome blog!"And I am on "Course 1" course homepageAnd I should see "S1 First Blog ENGLISH"And I follow "S1 First Blog"And I should see "This is my awesome blog!"Scenario: Students only see a few entries in the recent blog entries blockGiven I am on the "Course 1" course page logged in as student1And I follow "Add an entry about this course"# Blog 1 of 5And I set the following fields to these values:| Entry title | S1 First Blog || Blog entry body | This is my awesome blog! |And I press "Save changes"And I wait "1" secondsAnd I am on "Course 1" course homepageAnd I follow "Add an entry about this course"# Blog 2 of 5And I set the following fields to these values:| Entry title | S1 Second Blog || Blog entry body | This is my awesome blog! |And I press "Save changes"And I wait "1" secondsAnd I should see "S1 Second Blog"And I should see "This is my awesome blog!"And I am on "Course 1" course homepageAnd I follow "Add an entry about this course"# Blog 3 of 5And I set the following fields to these values:| Entry title | S1 Third Blog || Blog entry body | This is my awesome blog! |And I press "Save changes"And I wait "1" secondsAnd I should see "S1 Third Blog"And I should see "This is my awesome blog!"And I am on "Course 1" course homepageAnd I follow "Add an entry about this course"# Blog 4 of 5And I set the following fields to these values:| Entry title | S1 Fourth Blog || Blog entry body | This is my awesome blog! |And I press "Save changes"And I wait "1" secondsAnd I should see "S1 Fourth Blog"And I should see "This is my awesome blog!"And I am on "Course 1" course homepageAnd I follow "Add an entry about this course"# Blog 5 of 5And I set the following fields to these values:| Entry title | S1 Fifth Blog || Blog entry body | This is my awesome blog! |And I press "Save changes"And I should see "S1 Fifth Blog"And I should see "This is my awesome blog!"When I am on "Course 1" course homepageAnd I should not see "S1 First Blog"And I should see "S1 Second Blog"And I should see "S1 Third Blog"And I should see "S1 Fourth Blog"And I should see "S1 Fifth Blog"And I follow "S1 Fifth Blog"And I should see "This is my awesome blog!"Then I log outAnd I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I configure the "Recent blog entries" blockAnd I set the following fields to these values:| config_numberofrecentblogentries | 2 |And I press "Save changes"And I should see "S1 Fourth Blog"And I should see "S1 Fifth Blog"