diff --git a/tests/behat/auto_fetch_grades.feature b/tests/behat/auto_fetch_grades.feature index 138a959..3233607 100644 --- a/tests/behat/auto_fetch_grades.feature +++ b/tests/behat/auto_fetch_grades.feature @@ -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 | diff --git a/tests/behat/completion_course.feature b/tests/behat/completion_course.feature index a5afea5..a3716fe 100644 --- a/tests/behat/completion_course.feature +++ b/tests/behat/completion_course.feature @@ -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 | diff --git a/tests/behat/course_page_display.feature b/tests/behat/course_page_display.feature index 25501ce..cfe29bb 100644 --- a/tests/behat/course_page_display.feature +++ b/tests/behat/course_page_display.feature @@ -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 @@ -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 | @@ -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 | diff --git a/tests/behat/fetch_percentage_grades.feature b/tests/behat/fetch_percentage_grades.feature index 71f1d9b..afd79cf 100644 --- a/tests/behat/fetch_percentage_grades.feature +++ b/tests/behat/fetch_percentage_grades.feature @@ -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 | @@ -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 | diff --git a/tests/behat/hidden_grades.feature b/tests/behat/hidden_grades.feature index 431d264..6391105 100644 --- a/tests/behat/hidden_grades.feature +++ b/tests/behat/hidden_grades.feature @@ -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 | @@ -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 | diff --git a/tests/behat/instant_redirect.feature b/tests/behat/instant_redirect.feature index 97e9511..e9924f7 100644 --- a/tests/behat/instant_redirect.feature +++ b/tests/behat/instant_redirect.feature @@ -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 | @@ -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 | @@ -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 | @@ -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 |