Skip to content

Commit

Permalink
MDL-67812 core_contentbank: Modify behat tests
Browse files Browse the repository at this point in the history
Modify all behat tests that use the behat contentbank content generator
in order to use the updated generator structure
  • Loading branch information
Mihail Geshoski committed May 18, 2020
1 parent 2e4e031 commit 4f2a5f2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions backup/util/ui/tests/behat/import_contentbank_content.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: Import course content bank content
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
And the following "contentbank content" exist:
| course| contenttype | user | contentname |
| C1 | contenttype_h5p | teacher1 | ipsums.h5p |
| contextlevel | reference | contenttype | user | contentname |
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p |
And I log in as "teacher1"

Scenario: Import content bank content to another course
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Feature: Manage H5P content from the content bank
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "contentbank content" exist:
| course| contenttype | user | contentname |
| C1 | contenttype_h5p | admin | filltheblanks.h5p |
| C1 | contenttype_h5p | teacher1 | ipsums.h5p |
| contextlevel | reference | contenttype | user | contentname |
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p |
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add the "Navigation" block if not present
Expand Down
4 changes: 2 additions & 2 deletions contentbank/tests/behat/events.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Feature: Confirm content bank events are triggered
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "contentbank content" exist:
| course | contenttype | user | contentname |
| C1 | contenttype_h5p | admin | Existing |
| contextlevel | reference | contenttype | user | contentname |
| Course | C1 | contenttype_h5p | admin | Existing |
And I log in as "admin"
And I follow "Manage private files..."
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
Expand Down
18 changes: 9 additions & 9 deletions contentbank/tests/behat/search_content.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Feature: Search content in the content bank

Background:
Given the following "contentbank content" exist:
| contextid | contenttype | user | contentname |
| 1 | contenttype_h5p | admin | santjordi.h5p |
| 1 | contenttype_h5p | admin | santjordi_rose.h5p |
| 1 | contenttype_h5p | admin | SantJordi_book |
| 1 | contenttype_h5p | admin | Dragon_santjordi.h5p |
| 1 | contenttype_h5p | admin | princess.h5p |
| 1 | contenttype_h5p | admin | mathsbook.h5p |
| 1 | contenttype_h5p | admin | historybook.h5p |
| 1 | contenttype_h5p | admin | santvicenc.h5p |
| contextlevel | reference | contenttype | user | contentname |
| System | | contenttype_h5p | admin | santjordi.h5p |
| System | | contenttype_h5p | admin | santjordi_rose.h5p |
| System | | contenttype_h5p | admin | SantJordi_book |
| System | | contenttype_h5p | admin | Dragon_santjordi.h5p |
| System | | contenttype_h5p | admin | princess.h5p |
| System | | contenttype_h5p | admin | mathsbook.h5p |
| System | | contenttype_h5p | admin | historybook.h5p |
| System | | contenttype_h5p | admin | santvicenc.h5p |

Scenario: Admins can search content in the content bank
Given I log in as "admin"
Expand Down

0 comments on commit 4f2a5f2

Please sign in to comment.