1 |
efrain |
1 |
@core @core_course
|
|
|
2 |
Feature: Section 0 default/custom title
|
|
|
3 |
In order to set up a course
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to use/change default section 0 title
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | format |
|
|
|
13 |
| Course 1 | C1 | topics |
|
|
|
14 |
And the following "activities" exist:
|
|
|
15 |
| activity | name | intro | course | idnumber | section |
|
|
|
16 |
| data | Test database name | Test database description | C1 | database1 | 2 |
|
|
|
17 |
| forum | Test forum name | | C1 | forum1 | 1 |
|
|
|
18 |
And the following "course enrolments" exist:
|
|
|
19 |
| user | course | role |
|
|
|
20 |
| teacher1 | C1 | editingteacher |
|
|
|
21 |
|
|
|
22 |
Scenario: Default section 0 title is General
|
|
|
23 |
Given I log in as "teacher1"
|
|
|
24 |
When I am on "Course 1" course homepage with editing mode on
|
|
|
25 |
Then I should see "General" in the "li#section-0" "css_element"
|
|
|
26 |
|
|
|
27 |
@javascript
|
|
|
28 |
Scenario: Editing section 0 title
|
|
|
29 |
Given I log in as "teacher1"
|
|
|
30 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
31 |
And I set the field "Edit section name" in the "li#section-0" "css_element" to "Edited section 0"
|
|
|
32 |
And I should see "Edited section 0" in the "page" "region"
|
|
|
33 |
When I set the field "Edit section name" in the "li#section-0" "css_element" to ""
|
|
|
34 |
Then I should not see "Edited section 0" in the "li#section-0" "css_element"
|
|
|
35 |
And I should see "General" in the "li#section-0" "css_element"
|
|
|
36 |
And "New name for section" "field" should not exist
|
|
|
37 |
And I set the field "Edit section name" in the "li#section-0" "css_element" to "Edited section 0"
|
|
|
38 |
And I should see "Edited section 0" in the "page" "region"
|
|
|
39 |
And I set the field "Edit section name" in the "li#section-0" "css_element" to ""
|
|
|
40 |
And I should not see "Edited section 0" in the "page" "region"
|
|
|
41 |
And I should see "General" in the "page" "region"
|