[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @core @core_course 2 Feature: Add activities to courses 3 In order to provide tools for students learning 4 As a teacher 5 I need to add activites to a course 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | [email protected] | 11 | student2 | Student | 2 | [email protected] | 12 And the following "courses" exist: 13 | fullname | shortname | format | 14 | Course 1 | C1 | topics | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | student1 | C1 | student | 18 | student2 | C1 | student | 19 And I log in as "admin" 20 And I follow "Course 1" 21 And I turn editing mode on 22 23 @javascript 24 Scenario: Add an activity to a course 25 When I add a "Database" to section "3" and I fill the form with: 26 | Name | Test name | 27 | Description | Test database description | 28 | Entries required for completion | 9 | 29 | Allow comments on entries | Yes | 30 And I turn editing mode off 31 Then I should not see "Adding a new" 32 And I follow "Test name" 33 And I click on "Edit settings" "link" in the "Administration" "block" 34 And I expand all fieldsets 35 And the field "Name" matches value "Test name" 36 And the field "Entries required for completion" matches value "9" 37 And the field "Allow comments on entries" matches value "Yes" 38 39 @javascript 40 Scenario: Add an activity without the required fields 41 When I add a "Database" to section "3" and I fill the form with: 42 | Name | Test name | 43 And I press "Save and return to course" 44 Then I should see "Adding a new" 45 And I should see "Required" 46 And I press "Cancel" 47 48 Scenario: Add an activity to a course with Javascript disabled 49 Then I should see "Add a resource to section 'Topic 1'" 50 And I should see "Add an activity to section 'Topic 1'" 51 And I should see "Add a resource to section 'Topic 2'" 52 And I should see "Add an activity to section 'Topic 2'" 53 And I should see "Add a resource to section 'Topic 3'" 54 And I should see "Add an activity to section 'Topic 3'" 55 And I add a "Label" to section "2" 56 And I should see "Adding a new Label to Topic 2" 57 And I set the following fields to these values: 58 | Label text | I'm a label | 59 And I press "Save and return to course" 60 And I add a "Database" to section "3" 61 And I should see "Adding a new Database to Topic 3" 62 And I set the following fields to these values: 63 | Name | Test database name | 64 | Description | Test database description | 65 And I press "Save and return to course" 66 And I should not see "Adding a new" 67 And I should see "Test database name" 68 And I should see "I'm a label"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |