Skip to content

Commit

Permalink
Merge branch 'MDL-73788-master' of https://github.com/andelacruz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jul 26, 2022
2 parents af25a9c + 2b28996 commit b32b486
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 55 deletions.
37 changes: 9 additions & 28 deletions backup/util/ui/tests/behat/restore_moodle2_courses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ Feature: Restore Moodle 2 course backups
| Course 3 | C3 | 0 | topics | 2 | 0 |
| Course 4 | C4 | 0 | topics | 20 | 0 |
And the following "activities" exist:
| activity | course | idnumber | name | intro | section |
| assign | C3 | assign1 | Test assign name | Assign description | 1 |
| data | C3 | data1 | Test database name | Database description | 2 |
| activity | course | idnumber | name | intro | section | externalurl |
| assign | C3 | assign1 | Test assign name | Assign description | 1 | |
| data | C3 | data1 | Test database name | Database description | 2 | |
| url | C1 | url1 | Test URL name | Test URL description | 3 | http://www.moodle.org |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
Expand Down Expand Up @@ -108,11 +109,7 @@ Feature: Restore Moodle 2 course backups

@javascript
Scenario: Restore a backup in an existing course retaining the backup course settings
Given I add a "URL" to section "3" and I fill the form with:
| Name | Test URL name |
| Description | Test URL description |
| id_externalurl | http://www.moodle.org |
And I hide section "3"
Given I hide section "3"
And I hide section "7"
When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz |
Expand All @@ -134,11 +131,7 @@ Feature: Restore Moodle 2 course backups

@javascript
Scenario: Restore a backup in an existing course keeping the target course settings
Given I add a "URL" to section "3" and I fill the form with:
| Name | Test URL name |
| Description | Test URL description |
| id_externalurl | http://www.moodle.org |
And I hide section "3"
Given I hide section "3"
And I hide section "7"
When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz |
Expand All @@ -160,11 +153,7 @@ Feature: Restore Moodle 2 course backups

@javascript
Scenario: Restore a backup in an existing course deleting contents and retaining the backup course settings
Given I add a "URL" to section "3" and I fill the form with:
| Name | Test URL name |
| Description | Test URL description |
| id_externalurl | http://www.moodle.org |
And I hide section "3"
Given I hide section "3"
And I hide section "7"
When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 |
Expand All @@ -188,11 +177,7 @@ Feature: Restore Moodle 2 course backups

@javascript
Scenario: Restore a backup in an existing course deleting contents and keeping the current course settings
Given I add a "URL" to section "3" and I fill the form with:
| Name | Test URL name |
| Description | Test URL description |
| id_externalurl | http://www.moodle.org |
And I hide section "3"
Given I hide section "3"
And I hide section "7"
When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 |
Expand All @@ -216,11 +201,7 @@ Feature: Restore Moodle 2 course backups

@javascript
Scenario: Restore a backup in an existing course deleting contents decreasing the number of sections
Given I add a "URL" to section "3" and I fill the form with:
| Name | Test URL name |
| Description | Test URL description |
| id_externalurl | http://www.moodle.org |
And I hide section "3"
Given I hide section "3"
And I hide section "7"
When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 |
Expand Down
71 changes: 49 additions & 22 deletions blocks/site_main_menu/tests/behat/add_url.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@ Feature: Add URL to main menu block
And I am on site homepage
And I turn editing mode on
And I add the "Main menu" block
When I add a "URL" to section "0" and I fill the form with:
| Name | reference link |
| Description | mooooooooodle |
| External URL | http://www.moodle.com |
| id_display | In pop-up |
And the following "activity" exists:
| activity | url |
| course | Acceptance test site |
| name | reference link |
| intro | mooooooooodle |
| externalurl | http://www.moodle.com |
| section | 0 |
When I am on the "reference link" "url activity editing" page
And I expand all fieldsets
And I set the following fields to these values:
| id_display | In pop-up |
And I press "Save and return to course"
Then "reference link" "link" should exist in the "Main menu" "block"
And "Add an activity or resource" "button" should exist in the "Main menu" "block"

Expand All @@ -33,11 +40,18 @@ Feature: Add URL to main menu block
And I set the following fields to these values:
| Page contexts | Display throughout the entire site |
And I press "Save changes"
And I add a "URL" to section "0" and I fill the form with:
| Name | reference link |
| Description | mooooooooodle |
| External URL | http://www.moodle.com |
| id_display | Embed |
And the following "activity" exists:
| activity | url |
| course | Acceptance test site |
| name | reference link |
| intro | mooooooooodle |
| externalurl | http://www.moodle.com |
| section | 0 |
And I am on the "reference link" "url activity editing" page
And I expand all fieldsets
And I set the following fields to these values:
| id_display | Embed |
And I press "Save and return to course"
Then I click on "reference link" "link" in the "Main menu" "block"
And "reference link" "link" should exist in the "Main menu" "block"
And I am on the "C1" "Course" page
Expand All @@ -60,11 +74,18 @@ Feature: Add URL to main menu block
And I set the following fields to these values:
| Page contexts | Display on the site home and any pages added to the site home. |
And I press "Save changes"
And I add a "URL" to section "0" and I fill the form with:
| Name | reference link |
| Description | mooooooooodle |
| External URL | http://www.moodle.com |
| id_display | Embed |
And the following "activity" exists:
| activity | url |
| course | Acceptance test site |
| name | reference link |
| intro | mooooooooodle |
| externalurl | http://www.moodle.com |
| section | 0 |
And I am on the "reference link" "url activity editing" page
And I expand all fieldsets
And I set the following fields to these values:
| id_display | Embed |
And I press "Save and return to course"
Then I click on "reference link" "link" in the "Main menu" "block"
And "reference link" "link" should exist in the "Main menu" "block"
And I am on the "C1" "Course" page
Expand All @@ -87,12 +108,18 @@ Feature: Add URL to main menu block
And I set the following fields to these values:
| Page contexts | Display throughout the entire site |
And I press "Save changes"
When I am on the "C1" Course page
And I add a "URL" to section "0" and I fill the form with:
| Name | reference link |
| Description | mooooooooodle |
| External URL | http://www.moodle.com |
| Display description on course page | 1 |
| id_display | In pop-up |
When the following "activity" exists:
| activity | url |
| course | C1 |
| name | reference link |
| intro | mooooooooodle |
| externalurl | http://www.moodle.com |
| section | 0 |
| showdescription | 1 |
And I am on the "reference link" "url activity editing" page
And I expand all fieldsets
And I set the following fields to these values:
| id_display | In pop-up |
And I press "Save and return to course"
Then "reference link" "link" should not exist in the "Main menu" "block"
And I should see "mooooooooodle" in the "region-main" "region"
13 changes: 8 additions & 5 deletions media/player/videojs/tests/behat/modules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ Feature: Embed videos without the media filter

@javascript
Scenario: Add a video in a URL resource. Make sure media filters work
When I add a "URL" to section "1" and I fill the form with:
| Name | Video URL |
| Description | Example of a video url |
| External URL | http://download.moodle.org/mediatest/quicktime_320_180.mov |
And I follow "Video URL"
Given the following "activity" exists:
| activity | url |
| course | Acceptance test site |
| name | Video URL |
| intro | Example of a video url |
| externalurl | http://download.moodle.org/mediatest/quicktime_320_180.mov |
| section | 1 |
When I am on the "Video URL" "url activity" page
Then ".video-js" "css_element" should exist
And I am on site homepage

Expand Down

0 comments on commit b32b486

Please sign in to comment.