1 |
efrain |
1 |
@mod @mod_glossary
|
|
|
2 |
Feature: Create a glossary entry.
|
|
|
3 |
In order to create glossary entries
|
|
|
4 |
As a user
|
|
|
5 |
I should be able to enter an entry without using reserved keywords
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | format |
|
|
|
14 |
| Course 1 | C1 | topics |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activity" exists:
|
|
|
20 |
| activity | glossary |
|
|
|
21 |
| course | C1 |
|
|
|
22 |
| name | Test glossary |
|
|
|
23 |
|
|
|
24 |
Scenario: Glossary entry edition of custom tags works as expected
|
|
|
25 |
Given I am on the "Test glossary" "glossary activity" page logged in as "teacher1"
|
|
|
26 |
When I press "Add entry"
|
|
|
27 |
And I set the following fields to these values:
|
|
|
28 |
| Concept | Dummy first entry |
|
|
|
29 |
| Definition | Dream is the start of a journey |
|
|
|
30 |
| Keyword(s) | " |
|
|
|
31 |
And I press "Save changes"
|
|
|
32 |
Then I should see "One or more keywords contain a special character which cannot be used."
|
|
|
33 |
|
|
|
34 |
@javascript @_file_upload
|
|
|
35 |
Scenario: Create glossary entry with attached file
|
|
|
36 |
Given I am on the "Test glossary" "glossary activity" page logged in as student1
|
|
|
37 |
# As a student, add a glossary entry with attachment
|
|
|
38 |
And I press "Add entry"
|
|
|
39 |
And I set the following fields to these values:
|
|
|
40 |
| Concept | Entry 1 |
|
|
|
41 |
| Definition | Definition of Entry 1 |
|
|
|
42 |
| Attachment | mod/glossary/tests/fixtures/musicians.xml |
|
|
|
43 |
And I press "Save changes"
|
|
|
44 |
# Confirm you can download attachment from student's entry as teacher
|
|
|
45 |
When I am on the "Test glossary" "glossary activity" page logged in as teacher1
|
|
|
46 |
Then I should see "Entry 1"
|
|
|
47 |
And I should see "musicians.xml"
|
|
|
48 |
And following "musicians.xml" should download between "1" and "3000" bytes
|