MDL-79029 behat: optimize behat tests
Replace some add activity to section steps to the new add activity to course section so they are faster and do not require javascript.
This commit is contained in:
@@ -120,8 +120,7 @@ Feature: Add customised file types
|
||||
| Custom description | Froggy file |
|
||||
And I press "Save changes"
|
||||
# Create a resource activity and add it to a course
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I add a "File" to section "1"
|
||||
When I add a resource activity to course "Course 1" section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | An example of customised file type |
|
||||
| Description | File description |
|
||||
|
||||
@@ -21,8 +21,7 @@ Feature: Private rule sets
|
||||
| Group A | C1 | GA | 0 |
|
||||
| Group B | C1 | GB | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Page" to section "1"
|
||||
And I add a page activity to course "Course 1" section "1"
|
||||
And I expand all fieldsets
|
||||
|
||||
Scenario: Add restriction with visible condition (must match), display option should be active
|
||||
|
||||
@@ -11,15 +11,13 @@ Feature: Add activities to courses
|
||||
|
||||
@javascript
|
||||
Scenario: Add an activity to a course
|
||||
Given I am on the "Course 1" Course page logged in as admin
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I add a "Database" to section "3" and I fill the form with:
|
||||
Given I log in as "admin"
|
||||
When I add a data activity to course "Course 1" section "3" and I fill the form with:
|
||||
| Name | Test name |
|
||||
| Description | Test database description |
|
||||
| ID number | TESTNAME |
|
||||
| Allow comments on entries | Yes |
|
||||
| Force language | English |
|
||||
And I turn editing mode off
|
||||
Then I should not see "Adding a new"
|
||||
And I turn editing mode on
|
||||
And I open "Test name" actions menu
|
||||
@@ -30,32 +28,26 @@ Feature: Add activities to courses
|
||||
| Allow comments on entries | Yes |
|
||||
| Force language | English (en) |
|
||||
|
||||
@javascript
|
||||
Scenario: Add an activity supplying only the name
|
||||
Given I am on the "Course 1" Course page logged in as admin
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I add a "Database" to section "3" and I fill the form with:
|
||||
Given I log in as "admin"
|
||||
When I add a data activity to course "Course 1" section "3" and I fill the form with:
|
||||
| Name | Test name |
|
||||
Then I should see "Test name"
|
||||
|
||||
@javascript
|
||||
Scenario: Set activity description to required then add an activity supplying only the name
|
||||
Given the following config values are set as admin:
|
||||
| requiremodintro | 1 |
|
||||
And I am on the "Course 1" Course page logged in as admin
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add a "Database" to section "3" and I fill the form with:
|
||||
And I log in as "admin"
|
||||
And I add a data activity to course "Course 1" section "3" and I fill the form with:
|
||||
| Name | Test name |
|
||||
Then I should see "Required"
|
||||
|
||||
@javascript
|
||||
Scenario: The activity description should use the user's preferred editor on creation
|
||||
Given the following "user preferences" exist:
|
||||
| user | preference | value |
|
||||
| admin | htmleditor | textarea |
|
||||
And I am logged in as admin
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I add a "Database" to section "3"
|
||||
When I add a data activity to course "Course 1" section "3"
|
||||
Then the field "Description format" matches value "0"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -24,7 +24,7 @@ Feature: Embed videos without the media filter
|
||||
|
||||
@javascript
|
||||
Scenario: Add a video as a File resource. Make sure media filters work
|
||||
When I add a "File" to section "1"
|
||||
When I add a "File" to section "1" using the activity chooser
|
||||
And I set the following fields to these values:
|
||||
| Name | Video File |
|
||||
| Description | Example of a video file |
|
||||
|
||||
Reference in New Issue
Block a user