1441 |
ariadna |
1 |
@mod @mod_subsection
|
|
|
2 |
Feature: Teachers can rename subsections
|
|
|
3 |
In order to change subsections name
|
|
|
4 |
As an teacher
|
|
|
5 |
I need to sync subsection and activity names
|
|
|
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 | category | numsections |
|
|
|
13 |
| Course 1 | C1 | 0 | 2 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | course | idnumber | section |
|
|
|
19 |
| subsection | Subsection activity | C1 | forum1 | 1 |
|
|
|
20 |
| data | Subactivity | C1 | data1 | 3 |
|
|
|
21 |
And I log in as "teacher1"
|
|
|
22 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Renaming the subsection activity changes the subsection name
|
|
|
26 |
Given I should see "Subsection activity" in the "page-content" "region"
|
|
|
27 |
When I set the field "Edit section name" in the "Subsection activity" "activity" to "New name"
|
|
|
28 |
And I should not see "Subsection activity" in the "region-main" "region"
|
|
|
29 |
And I should see "New name" in the "page-content" "region"
|
|
|
30 |
Then I open "New name" actions menu
|
|
|
31 |
And I choose "View" in the open action menu
|
|
|
32 |
And I should see "New name" in the "page" "region"
|
|
|
33 |
And I should see "Subactivity" in the "region-main" "region"
|
|
|
34 |
|
|
|
35 |
Scenario: Renaming the subsection using the settings form renames the module
|
|
|
36 |
Given I should see "Subsection activity" in the "page-content" "region"
|
|
|
37 |
When I click on "Edit settings" "link" in the "Subsection activity" "activity"
|
|
|
38 |
And I set the following fields to these values:
|
|
|
39 |
| Section name | New name |
|
|
|
40 |
And I press "Save changes"
|
|
|
41 |
Then I should see "New name" in the "page" "region"
|
|
|
42 |
And I should see "Subactivity" in the "region-main" "region"
|
|
|
43 |
And I am on "Course 1" course homepage
|
|
|
44 |
And I should see "New name" in the "page-content" "region"
|
|
|
45 |
|
|
|
46 |
@javascript
|
|
|
47 |
Scenario: Renaming the subsection renames the subsection activity name
|
|
|
48 |
Given I click on "Subsection activity" "link" in the "page-content" "region"
|
|
|
49 |
And I should see "Subsection activity" in the "page" "region"
|
|
|
50 |
And I should see "Subactivity" in the "region-main" "region"
|
|
|
51 |
When I set the field "Edit section name" in the "page" "region" to "New name"
|
|
|
52 |
Then I should see "New name" in the "page" "region"
|
|
|
53 |
And I am on "Course 1" course homepage
|
|
|
54 |
And I should see "New name" in the "page-content" "region"
|