@@ -6,20 +6,24 @@ Feature: Restore Moodle 2 course backups
6
6
7
7
Background :
8
8
Given the following "courses" exist:
9
- | fullname | shortname | category | format | numsections | coursedisplay |
10
- | Course 1 | C1 | 0 | topics | 15 | 1 |
11
- | Course 2 | C2 | 0 | topics | 5 | 0 |
12
- | Course 3 | C3 | 0 | topics | 2 | 0 |
13
- | Course 4 | C4 | 0 | topics | 20 | 0 |
9
+ | fullname | shortname | category | format | numsections | coursedisplay | initsections |
10
+ | Course 1 | C1 | 0 | topics | 15 | 1 | 1 |
11
+ | Course 2 | C2 | 0 | topics | 5 | 0 | 1 |
12
+ | Course 3 | C3 | 0 | topics | 2 | 0 | 1 |
13
+ | Course 4 | C4 | 0 | topics | 20 | 0 | 1 |
14
+ | Course 5 | C5 | 0 | topics | 15 | 1 | 0 |
14
15
And the following "activities" exist:
15
16
| activity | course | idnumber | name | intro | section | externalurl |
16
17
| assign | C3 | assign1 | Test assign name | Assign description | 1 | |
17
18
| data | C3 | data1 | Test database name | Database description | 2 | |
18
19
| forum | C1 | 0001 | Test forum name | | 1 | |
19
20
| url | C1 | url1 | Test URL name | Test URL description | 3 | http ://www .moodle .org |
21
+ | forum | C5 | 0005 | Test forum name | | 1 | |
22
+ | url | C5 | url5 | Test URL name | Test URL description | 3 | http ://www .moodle .org |
20
23
And the following "blocks" exist:
21
24
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
22
25
| activity_modules | Course | C1 | course -view -* | side -pre |
26
+ | activity_modules | Course | C5 | course -view -* | side -pre |
23
27
And I log in as "admin"
24
28
And I am on "Course 1" course homepage with editing mode on
25
29
@@ -41,8 +45,8 @@ Feature: Restore Moodle 2 course backups
41
45
Then I should see "Course 1 restored in a new course"
42
46
And I should see "Activities" in the "Activities" "block"
43
47
And I should see "Test forum name"
44
- And I should see "Topic 15"
45
- And I should not see "Topic 16"
48
+ And I should see "Section 15"
49
+ And I should not see "Section 16"
46
50
And I navigate to "Settings" in current page administration
47
51
And I expand all fieldsets
48
52
And the field "id_format" matches value "Custom sections"
@@ -79,10 +83,10 @@ Feature: Restore Moodle 2 course backups
79
83
80
84
@javascript
81
85
Scenario : Restore a backup into a new course changing the course format afterwards
82
- Given I backup "Course 1 " course using this options:
86
+ Given I backup "Course 5 " course using this options:
83
87
| Confirmation | Filename | test_backup .mbz |
84
88
When I restore "test_backup.mbz" backup into a new course using this options:
85
- Then I should see "Topic 1 "
89
+ Then I should see "New section "
86
90
And I should see "Test forum name"
87
91
And I navigate to "Settings" in current page administration
88
92
And I expand all fieldsets
@@ -125,10 +129,10 @@ Feature: Restore Moodle 2 course backups
125
129
And section "3" should be visible
126
130
And section "7" should be hidden
127
131
And section "15" should be visible
128
- And I should see "Topic 15"
129
- And I should not see "Topic 16"
130
- And I should see "Test URL name" in the "Topic 3" "section"
131
- And I should see "Test forum name" in the "Topic 1" "section"
132
+ And I should see "Section 15"
133
+ And I should not see "Section 16"
134
+ And I should see "Test URL name" in the "Section 3" "section"
135
+ And I should see "Test forum name" in the "Section 1" "section"
132
136
133
137
@javascript
134
138
Scenario : Restore a backup in an existing course keeping the target course settings
@@ -147,10 +151,10 @@ Feature: Restore Moodle 2 course backups
147
151
And section "3" should be visible
148
152
And section "7" should be hidden
149
153
And section "15" should be visible
150
- And I should see "Topic 15"
151
- And I should not see "Topic 16"
152
- And I should see "Test URL name" in the "Topic 3" "section"
153
- And I should see "Test forum name" in the "Topic 1" "section"
154
+ And I should see "Section 15"
155
+ And I should not see "Section 16"
156
+ And I should see "Test URL name" in the "Section 3" "section"
157
+ And I should see "Test forum name" in the "Section 1" "section"
154
158
155
159
@javascript
156
160
Scenario : Restore a backup in an existing course deleting contents and retaining the backup course settings
@@ -171,10 +175,10 @@ Feature: Restore Moodle 2 course backups
171
175
And section "3" should be hidden
172
176
And section "7" should be hidden
173
177
And section "15" should be visible
174
- And I should see "Topic 15"
175
- And I should not see "Topic 16"
176
- And I should see "Test URL name" in the "Topic 3" "section"
177
- And I should see "Test forum name" in the "Topic 1" "section"
178
+ And I should see "Section 15"
179
+ And I should not see "Section 16"
180
+ And I should see "Test URL name" in the "Section 3" "section"
181
+ And I should see "Test forum name" in the "Section 1" "section"
178
182
179
183
@javascript
180
184
Scenario : Restore a backup in an existing course deleting contents and keeping the current course settings
@@ -195,10 +199,10 @@ Feature: Restore Moodle 2 course backups
195
199
And section "3" should be hidden
196
200
And section "7" should be hidden
197
201
And section "15" should be visible
198
- And I should see "Topic 15"
199
- And I should not see "Topic 16"
200
- And I should see "Test URL name" in the "Topic 3" "section"
201
- And I should see "Test forum name" in the "Topic 1" "section"
202
+ And I should see "Section 15"
203
+ And I should not see "Section 16"
204
+ And I should see "Test URL name" in the "Section 3" "section"
205
+ And I should see "Test forum name" in the "Section 1" "section"
202
206
203
207
@javascript
204
208
Scenario : Restore a backup in an existing course deleting contents decreasing the number of sections
@@ -219,10 +223,10 @@ Feature: Restore Moodle 2 course backups
219
223
And section "3" should be hidden
220
224
And section "7" should be hidden
221
225
And section "15" should be visible
222
- And I should see "Topic 15"
223
- And I should not see "Topic 16"
224
- And I should see "Test URL name" in the "Topic 3" "section"
225
- And I should see "Test forum name" in the "Topic 1" "section"
226
+ And I should see "Section 15"
227
+ And I should not see "Section 16"
228
+ And I should see "Test URL name" in the "Section 3" "section"
229
+ And I should see "Test forum name" in the "Section 1" "section"
226
230
227
231
@javascript
228
232
Scenario : Restore a backup with override permission
0 commit comments