MDL-82596 behat: tidy up existing usage of private files generator.

Filename is no longer required (since 83db25c330), given it never
did anything so can be removed. Requiring the "Private files" block
also isn't necessary since original switch to generator methods.
This commit is contained in:
Paul Holden
2024-07-25 19:58:37 +01:00
parent 1a33da6637
commit 794115abdf
7 changed files with 12 additions and 33 deletions
@@ -21,12 +21,9 @@ Feature: Default value for the textarea custom field can contain images
And the following "custom field categories" exist:
| name | component | area | itemid |
| Category for test | core_course | course | 0 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the following "user private files" exist:
| user | filepath | filename |
| admin | lib/tests/fixtures/gd-logo.png | gd-logo.png |
| user | filepath |
| admin | lib/tests/fixtures/gd-logo.png |
And I log in as "admin"
And I navigate to "Courses > Default settings > Course custom fields" in site administration
And I click on "Add a new custom field" "link"
@@ -25,12 +25,9 @@ Feature: Teachers can edit course custom fields
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the following "user private files" exist:
| user | filepath | filename |
| admin | lib/tests/fixtures/gd-logo.png | gd-logo.png |
| user | filepath |
| admin | lib/tests/fixtures/gd-logo.png |
Scenario: Display custom fields on course edit form
When I log in as "teacher1"
@@ -14,9 +14,6 @@ Feature: Render H5P content using filters
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the "displayh5p" filter is "on"
And the following config values are set as admin:
| allowedsources | https://moodle.h5p.com/content/[id]/embed | filter_displayh5p |
@@ -20,12 +20,9 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page
| course | C1 |
| activity | lesson |
| name | Test lesson name |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the following "user private files" exist:
| user | filepath | filename |
| teacher1 | mod/lesson/tests/fixtures/moodle_logo.jpg | moodle_logo.jpg |
| user | filepath |
| teacher1 | mod/lesson/tests/fixtures/moodle_logo.jpg |
And I log in as "teacher1"
Scenario: Duplicate content page with an image.
@@ -20,12 +20,9 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
| course | C1 |
| activity | lesson |
| name | Test lesson name |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the following "user private files" exist:
| user | filepath | filename |
| teacher1 | mod/lesson/tests/fixtures/moodle_logo.jpg | moodle_logo.jpg |
| user | filepath |
| teacher1 | mod/lesson/tests/fixtures/moodle_logo.jpg |
And I log in as "teacher1"
When I am on the "Test lesson name" "lesson activity" page
And I follow "Add a question page"
@@ -28,12 +28,9 @@ Feature: Teachers can override the grade for any question
And quiz "Quiz 1" contains the following questions:
| question | page |
| TF1 | 1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the following "user private files" exist:
| user | filepath | filename |
| teacher1 | mod/quiz/tests/fixtures/moodle_logo.jpg | moodle_logo.jpg |
| user | filepath |
| teacher1 | mod/quiz/tests/fixtures/moodle_logo.jpg |
And I am on the "Quiz 1" "mod_quiz > View" page logged in as "student1"
And I press "Attempt quiz"
And I follow "Finish attempt ..."
@@ -10,17 +10,14 @@ Feature: Teachers can embed images into instructions and conclusion fields
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And the following "user private files" exist:
| user | filepath | filename |
| teacher1 | mod/workshop/tests/fixtures/moodlelogo.png | moodlelogo.png |
| user | filepath |
| teacher1 | mod/workshop/tests/fixtures/moodlelogo.png |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And the following "activities" exist:
| activity | course | name |
| workshop | C1 | Workshop with embedded images |