[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @block @block_blog_menu @mod_assign @block_blog_recent 2 Feature: Students can use the recent blog entries block to view recent entries on an activity page 3 In order to enable the recent blog entries block an activity page 4 As a teacher 5 I can add the recent blog entries block to an activity page 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | idnumber | 10 | teacher1 | Teacher | 1 | teacher1@example.com | T1 | 11 | student1 | Student | 1 | student1@example.com | S1 | 12 | student2 | Student | 2 | student2@example.com | S2 | 13 And the following "courses" exist: 14 | fullname | shortname | category | 15 | Course 1 | C1 | 0 | 16 And the following "course enrolments" exist: 17 | user | course | role | 18 | teacher1 | C1 | editingteacher | 19 | student1 | C1 | student | 20 | student2 | C1 | student | 21 And I log in as "teacher1" 22 And I follow "Course 1" 23 And I turn editing mode on 24 And I add a "Assignment" to section "1" and I fill the form with: 25 | Assignment name | Test assignment 1 | 26 | Description | Offline text | 27 | assignsubmission_file_enabled | 0 | 28 And I follow "Test assignment 1" 29 And I add the "Blog menu" block 30 And I add the "Recent blog entries" block 31 And I log out 32 33 Scenario: Students use the recent blog entries block to view blogs 34 Given I log in as "student1" 35 And I follow "Course 1" 36 And I follow "Test assignment 1" 37 And I follow "Add an entry about this Assignment" 38 When I set the following fields to these values: 39 | Entry title | S1 First Blog | 40 | Blog entry body | This is my awesome blog! | 41 And I press "Save changes" 42 Then I should see "S1 First Blog" 43 And I should see "This is my awesome blog!" 44 And I follow "Test assignment 1" 45 And I should see "S1 First Blog" 46 And I follow "S1 First Blog" 47 And I should see "This is my awesome blog!" 48 49 Scenario: Students only see a few entries in the recent blog entries block 50 Given I log in as "student1" 51 And I follow "Course 1" 52 And I follow "Test assignment 1" 53 And I follow "Add an entry about this Assignment" 54 # Blog 1 of 5 55 And I set the following fields to these values: 56 | Entry title | S1 First Blog | 57 | Blog entry body | This is my awesome blog! | 58 And I press "Save changes" 59 And I wait "1" seconds 60 And I follow "Test assignment 1" 61 And I follow "Add an entry about this Assignment" 62 # Blog 2 of 5 63 And I set the following fields to these values: 64 | Entry title | S1 Second Blog | 65 | Blog entry body | This is my awesome blog! | 66 And I press "Save changes" 67 And I wait "1" seconds 68 And I should see "S1 Second Blog" 69 And I should see "This is my awesome blog!" 70 And I follow "Test assignment 1" 71 And I follow "Add an entry about this Assignment" 72 # Blog 3 of 5 73 And I set the following fields to these values: 74 | Entry title | S1 Third Blog | 75 | Blog entry body | This is my awesome blog! | 76 And I press "Save changes" 77 And I wait "1" seconds 78 And I should see "S1 Third Blog" 79 And I should see "This is my awesome blog!" 80 And I follow "Test assignment 1" 81 And I follow "Add an entry about this Assignment" 82 # Blog 4 of 5 83 And I set the following fields to these values: 84 | Entry title | S1 Fourth Blog | 85 | Blog entry body | This is my awesome blog! | 86 And I press "Save changes" 87 And I wait "1" seconds 88 And I should see "S1 Fourth Blog" 89 And I should see "This is my awesome blog!" 90 And I follow "Test assignment 1" 91 And I follow "Add an entry about this Assignment" 92 # Blog 5 of 5 93 And I set the following fields to these values: 94 | Entry title | S1 Fifth Blog | 95 | Blog entry body | This is my awesome blog! | 96 And I press "Save changes" 97 And I should see "S1 Fifth Blog" 98 And I should see "This is my awesome blog!" 99 When I follow "Test assignment 1" 100 And I should not see "S1 First Blog" 101 And I should see "S1 Second Blog" 102 And I should see "S1 Third Blog" 103 And I should see "S1 Fourth Blog" 104 And I should see "S1 Fifth Blog" 105 And I follow "S1 Fifth Blog" 106 And I should see "This is my awesome blog!" 107 Then I log out 108 And I log in as "teacher1" 109 And I follow "Course 1" 110 And I turn editing mode on 111 And I follow "Test assignment 1" 112 And I configure the "Recent blog entries" block 113 And I set the following fields to these values: 114 | id_config_numberofrecentblogentries | 2 | 115 And I press "Save changes" 116 And I should see "S1 Fourth Blog" 117 And I should see "S1 Fifth Blog"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |