mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-44612 mod_glossary: Test importing of glossary entries
* And check that the importing of entries is reflected in the recent activity block.
This commit is contained in:
parent
a52f3d9d0b
commit
ab9ee20ec7
34
mod/glossary/tests/behat/import_entries.feature
Normal file
34
mod/glossary/tests/behat/import_entries.feature
Normal file
@ -0,0 +1,34 @@
|
||||
@mod @mod_glossary
|
||||
Feature: Importing glossary entries
|
||||
In order to add glossary entries by bulk
|
||||
As a teacher
|
||||
I need to be able to import glossary entries from a file
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And the following "activities" exist:
|
||||
| activity | course | idnumber | name |
|
||||
| glossary | C1 | glossary1 | Glossary 1 |
|
||||
|
||||
@javascript @block_recent_activity
|
||||
Scenario: Importing glossary entries and checking the Recent activity block
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Recent activity" block
|
||||
And I follow "Glossary 1"
|
||||
And I navigate to "Import entries" in current page administration
|
||||
And I upload "mod/glossary/tests/fixtures/texfilter_glossary_en.xml" file to "File to import" filemanager
|
||||
When I press "Submit"
|
||||
Then I should see "103" in the "Total entries:" "table_row"
|
||||
And I should see "103" in the "Imported entries:" "table_row"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Added Glossary" in the "Recent activity" "block"
|
||||
And I should see "New glossary entries:" in the "Recent activity" "block"
|
1749
mod/glossary/tests/fixtures/texfilter_glossary_en.xml
vendored
Normal file
1749
mod/glossary/tests/fixtures/texfilter_glossary_en.xml
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user