Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #97: Fixed the i_add_to_section_and_i_fill_the_form_with Behat deprecation for Moodle 4.4 #98

Open
wants to merge 1 commit into
base: MOODLE_404_STABLE
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tests/behat/auto_fetch_grades.feature
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ Feature: Grades are fetched automatically from the referenced course
#
# Create the subcourse instance.
#
And I am on "MainCourse" course homepage
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
And I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down
3 changes: 1 addition & 2 deletions tests/behat/completion_course.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Feature: Completing the referenced course can lead to completing the subcourse a
And I enable "selfcompletion" "block" plugin
# Create the subcourse instance.
When I am on the "MainCourse" course page logged in as "teacher1"
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
And I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down
10 changes: 3 additions & 7 deletions tests/behat/course_page_display.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Feature: Progress and grade in referenced course can be displayed on the course
| Enable completion tracking | Yes |
And I press "Save and display"
And I turn editing mode on
And I add a "Text and media area" to section "1" and I fill the form with:
And I add a "label" activity to course "RefCourse" section "1" and I fill the form with:
| Text | Just a simple module to activate progress tracking |
And I turn editing mode off
And I navigate to "Setup > Gradebook setup" in the course gradebook
Expand All @@ -46,9 +46,7 @@ Feature: Progress and grade in referenced course can be displayed on the course

@javascript
Scenario: Progress and grade displayed on both course main page and subcourse view page.
Given I am on "MainCourse" course homepage
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
Given I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand All @@ -69,9 +67,7 @@ Feature: Progress and grade in referenced course can be displayed on the course

@javascript
Scenario: Progress and grade displayed on subcourse view page only.
Given I am on "MainCourse" course homepage
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
Given I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down
8 changes: 2 additions & 6 deletions tests/behat/fetch_percentage_grades.feature
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ Feature: Grades can be fetched either a real values or as percentages

@javascript
Scenario: Grades are fetched as real values by default
Given I am on the "MainCourse" course page logged in as "teacher1"
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
Given I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down Expand Up @@ -146,9 +144,7 @@ Feature: Grades can be fetched either a real values or as percentages

@javascript
Scenario: Grades can be fetched as percentual values
Given I am on the "MainCourse" course page logged in as "teacher1"
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
Given I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down
8 changes: 2 additions & 6 deletions tests/behat/hidden_grades.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ Feature: Course final grades hidden in the referenced course are hidden in the t

@javascript
Scenario: If the course final grade is hidden, the associated subcourse activity grade is marked as hidden, too.
Given I am on "MainCourse" course homepage
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
Given I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down Expand Up @@ -90,9 +88,7 @@ Feature: Course final grades hidden in the referenced course are hidden in the t
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "RefCourse":
| Hidden | 1 |
And I am on "MainCourse" course homepage
And I turn editing mode on
And I add a "Subcourse" to section "1" and I fill the form with:
Given I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand Down
8 changes: 4 additions & 4 deletions tests/behat/instant_redirect.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: Clicking the subcourse instance in the course outline may or may not re

@javascript
Scenario: Student has to click the link to the referenced course manually
And I add a "Subcourse" to section "1" and I fill the form with:
And I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 0 |
Expand All @@ -39,7 +39,7 @@ Feature: Clicking the subcourse instance in the course outline may or may not re

@javascript
Scenario: Student is instantly redirected to the referenced course
And I add a "Subcourse" to section "1" and I fill the form with:
And I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 1 |
Expand All @@ -51,7 +51,7 @@ Feature: Clicking the subcourse instance in the course outline may or may not re

@javascript
Scenario: Teacher is not redirected instantly even if that is enabled
And I add a "Subcourse" to section "1" and I fill the form with:
And I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 1 |
Expand All @@ -62,7 +62,7 @@ Feature: Clicking the subcourse instance in the course outline may or may not re

@javascript
Scenario: Teacher is redirected instantly if unable to fetch grades manually
And I add a "Subcourse" to section "1" and I fill the form with:
And I add a "subcourse" activity to course "MainCourse" section "1" and I fill the form with:
| Subcourse name | Unit course 1 |
| Fetch grades from | RefCourse (R) |
| Redirect to the referenced course | 1 |
Expand Down
Loading