mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-75961 behat: review and enhance mod_imscp tests
This commit makes the following improvements to mod_imscp tests: * Removes unnecessary @javascript and @_file_upload tags from non-JS tests. * Removes user/enrol data generation from tests that can be performed as admin. * Removes "I log out" and other unnecessary steps.
This commit is contained in:
parent
deb4e69f74
commit
42a01d20e3
@ -1,4 +1,4 @@
|
||||
@mod @mod_imscp @javascript @_file_upload
|
||||
@mod @mod_imscp
|
||||
Feature: Display the IMS content package description in the IMSCP and optionally in the course
|
||||
In order to display the the IMS content package description description in the course
|
||||
As a teacher
|
||||
|
@ -1,4 +1,4 @@
|
||||
@mod @mod_imscp @_file_upload @core_completion @javascript
|
||||
@mod @mod_imscp @core_completion
|
||||
Feature: View activity completion information in the IMS content package activity
|
||||
In order to have visibility of IMS content package completion requirements
|
||||
As a student
|
||||
@ -21,12 +21,11 @@ Feature: View activity completion information in the IMS content package activit
|
||||
Given the following "activities" exist:
|
||||
| activity | course | name | completion | completionview | packagefilepath |
|
||||
| imscp | C1 | Music history | 2 | 1 | mod/imscp/tests/pacakges/singescobbasic.zip |
|
||||
# Teacher view.
|
||||
And I am on the "Music history" "imscp activity" page logged in as teacher1
|
||||
# Student view.
|
||||
When I am on the "Music history" "imscp activity" page logged in as student1
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
|
||||
@javascript
|
||||
Scenario: Use manual completion
|
||||
Given the following "activities" exist:
|
||||
| activity | course | name | completion | packagefilepath |
|
||||
@ -34,7 +33,6 @@ Feature: View activity completion information in the IMS content package activit
|
||||
And I am on the "Music history" "imscp activity" page logged in as teacher1
|
||||
# Teacher view.
|
||||
And the manual completion button for "Music history" should be disabled
|
||||
And I log out
|
||||
# Student view.
|
||||
When I am on the "Music history" "imscp activity" page logged in as student1
|
||||
Then the manual completion button of "Music history" is displayed as "Mark as done"
|
||||
|
@ -3,18 +3,12 @@ Feature: Create an IMSCP activity through UI
|
||||
In order to confirm that IMSCP activity creation via UI works correctly
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | format |
|
||||
| Course 1 | C1 | topics |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
|
||||
Scenario: IMS activity is created using UI
|
||||
Given I am on the "Course 1" course page logged in as teacher1
|
||||
Given I am on the "Course 1" course page logged in as admin
|
||||
And I turn editing mode on
|
||||
And I add a "IMS content package" to section "1"
|
||||
And I set the following fields to these values:
|
||||
|
Loading…
x
Reference in New Issue
Block a user