1 |
efrain |
1 |
@javascript @theme_boost
|
|
|
2 |
Feature: Course reuse navigation
|
|
|
3 |
As a teacher
|
|
|
4 |
I can navigate to course reuse pages
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given the following "courses" exist:
|
|
|
8 |
| fullname | shortname | newsitems |
|
|
|
9 |
| Course 1 | C1 | 5 |
|
|
|
10 |
And the following "users" exist:
|
|
|
11 |
| username | firstname | lastname | email |
|
|
|
12 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
13 |
And the following "course enrolments" exist:
|
|
|
14 |
| user | course | role |
|
|
|
15 |
| teacher1 | C1 | editingteacher |
|
|
|
16 |
|
|
|
17 |
Scenario: A Teacher can navigate to the course Import page.
|
|
|
18 |
Given I log in as "teacher1"
|
|
|
19 |
When I am on "Course 1" course homepage
|
|
|
20 |
And I navigate to "Course reuse" in current page administration
|
|
|
21 |
Then I should not see "Find a course to import data from:"
|
|
|
22 |
And I should see "Import"
|
|
|
23 |
And I should see "Backup"
|
|
|
24 |
And I should see "Restore"
|
|
|
25 |
And I should not see "Copy course"
|
|
|
26 |
|
|
|
27 |
Scenario Outline: A Teacher can navigate to other Course reuse pages.
|
|
|
28 |
Given I log in as "teacher1"
|
|
|
29 |
When I am on "Course 1" course homepage
|
|
|
30 |
And I navigate to "Course reuse" in current page administration
|
|
|
31 |
And I follow "<adminpage>"
|
|
|
32 |
Then I should see "<content>"
|
|
|
33 |
|
|
|
34 |
Examples:
|
|
|
35 |
| adminpage | content |
|
|
|
36 |
| Backup | Backup settings |
|
|
|
37 |
| Restore | Upload a backup file |
|
|
|
38 |
| Import | Find a course to import data from: |
|
|
|
39 |
| Reset | Delete all user data and reset this course to its original state |
|
|
|
40 |
|
|
|
41 |
Scenario: An Administrator can view the course copy page.
|
|
|
42 |
Given I log in as "admin"
|
|
|
43 |
When I am on "Course 1" course homepage
|
|
|
44 |
And I navigate to "Course reuse" in current page administration
|
|
|
45 |
And I follow "Copy course"
|
|
|
46 |
Then I should see "Create a copy of this course in any course category"
|