1 |
efrain |
1 |
@mod @mod_glossary @_file_upload
|
|
|
2 |
Feature: Importing glossary entries
|
|
|
3 |
In order to add glossary entries by bulk
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to import glossary entries from a file
|
|
|
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 | Terry1 | Teacher1 | 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 | course | idnumber | name |
|
|
|
19 |
| glossary | C1 | glossary1 | Glossary 1 |
|
|
|
20 |
And the following "blocks" exist:
|
|
|
21 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
22 |
| recent_activity | Course | C1 | course-view-* | side-pre |
|
|
|
23 |
| tags | Course | C1 | course-view-* | side-pre |
|
|
|
24 |
And I am on the "Glossary 1" "glossary activity" page logged in as teacher1
|
|
|
25 |
|
|
|
26 |
@javascript @block_recent_activity
|
|
|
27 |
Scenario: Importing glossary entries and checking the Recent activity block
|
|
|
28 |
Given I press "Import entries"
|
|
|
29 |
And I upload "mod/glossary/tests/fixtures/texfilter_glossary_en.xml" file to "File to import" filemanager
|
|
|
30 |
When I press "Submit"
|
|
|
31 |
Then I should see "103" in the "Total entries:" "table_row"
|
|
|
32 |
And I should see "103" in the "Imported entries:" "table_row"
|
|
|
33 |
And I am on "Course 1" course homepage
|
|
|
34 |
And I should see "Added Glossary" in the "Recent activity" "block"
|
|
|
35 |
And I should see "New glossary entries:" in the "Recent activity" "block"
|
|
|
36 |
|
|
|
37 |
@javascript @block_tags
|
|
|
38 |
Scenario: Importing glossary entries and checking Tags block
|
|
|
39 |
Given I press "Import entries"
|
|
|
40 |
And I upload "mod/glossary/tests/fixtures/musicians.xml" file to "File to import" filemanager
|
|
|
41 |
When I press "Submit"
|
|
|
42 |
And I am on "Course 1" course homepage
|
|
|
43 |
And I click on "Beatles" "link" in the "Tags" "block"
|
|
|
44 |
Then I should see "Paul McCartney"
|