1 |
efrain |
1 |
@mod @mod_customcert
|
|
|
2 |
Feature: Being able to manage pages in a certificate template
|
|
|
3 |
In order to ensure managing pages in a certificate template works as expected
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to manage pages in a certificate template
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category |
|
|
|
10 |
| Course 1 | C1 | 0 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | intro | course | idnumber |
|
|
|
19 |
| customcert | Custom certificate 1 | Custom certificate 1 intro | C1 | customcert1 |
|
|
|
20 |
And I log in as "teacher1"
|
|
|
21 |
And I am on "Course 1" course homepage
|
|
|
22 |
And I follow "Custom certificate 1"
|
|
|
23 |
And I navigate to "Edit certificate" in current page administration
|
|
|
24 |
|
|
|
25 |
Scenario: Adding a page to a certificate template
|
|
|
26 |
And I follow "Add page"
|
|
|
27 |
And I should see "Page 1"
|
|
|
28 |
And I should see "Page 2"
|
|
|
29 |
|
|
|
30 |
Scenario: Deleting a page from a certificate template
|
|
|
31 |
And I add the element "Background image" to page "1" of the "Custom certificate 1" certificate template
|
|
|
32 |
And I press "Save changes"
|
|
|
33 |
And I add the element "Student name" to page "1" of the "Custom certificate 1" certificate template
|
|
|
34 |
And I press "Save changes"
|
|
|
35 |
And I follow "Add page"
|
|
|
36 |
And I should see "Page 1"
|
|
|
37 |
And I should see "Page 2"
|
|
|
38 |
And I delete page "2" of the "Custom certificate 1" certificate template
|
|
|
39 |
And I should see "Background image" in the "elementstable" "table"
|
|
|
40 |
And I should see "Student name" in the "elementstable" "table"
|
|
|
41 |
And I should not see "Page 1"
|
|
|
42 |
And I should not see "Page 2"
|