[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_forum 2 Feature: Students can edit or delete their forum posts within a set time limit 3 In order to refine forum posts 4 As a user 5 I need to edit or delete my forum posts within a certain period of time after posting 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | student1@example.com | 11 And the following "courses" exist: 12 | fullname | shortname | category | 13 | Course 1 | C1 | 0 | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | student1 | C1 | student | 17 And the following "activities" exist: 18 | activity | name | intro | course | idnumber | 19 | forum | Test forum name | Test forum description | C1 | forum | 20 And I log in as "student1" 21 And I follow "Course 1" 22 And I add a new discussion to "Test forum name" forum with: 23 | Subject | Forum post subject | 24 | Message | This is the body | 25 26 Scenario: Edit forum post 27 Given I follow "Forum post subject" 28 And I follow "Edit" 29 When I set the following fields to these values: 30 | Subject | Edited post subject | 31 | Message | Edited post body | 32 And I press "Save changes" 33 And I wait to be redirected 34 Then I should see "Edited post subject" 35 And I should see "Edited post body" 36 37 Scenario: Delete forum post 38 Given I follow "Forum post subject" 39 When I follow "Delete" 40 And I press "Continue" 41 Then I should not see "Forum post subject" 42 43 @javascript 44 Scenario: Time limit expires 45 Given I log out 46 And I log in as "admin" 47 And I expand "Site administration" node 48 And I expand "Security" node 49 And I follow "Site policies" 50 And I set the field "Maximum time to edit posts" to "1 minutes" 51 And I press "Save changes" 52 And I am on site homepage 53 And I follow "Course 1" 54 And I turn editing mode on 55 And I add a "Forum" to section "1" and I fill the form with: 56 | Forum name | Test forum name | 57 | Forum type | Standard forum for general use | 58 | Description | Test forum description | 59 And I log out 60 And I log in as "student1" 61 And I follow "Course 1" 62 When I wait "61" seconds 63 And I follow "Forum post subject" 64 Then I should not see "Edit" in the "region-main" "region" 65 And I should not see "Delete" in the "region-main" "region"
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 |