From 435ac352ca72ff9feddb977f6ebfb03776222b7d Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 18 Jan 2024 15:35:47 +0800 Subject: [PATCH] MDL-80656 behat: remove unnecessary activity duplication steps --- .../behat/lesson_informations_at_end.feature | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/mod/lesson/tests/behat/lesson_informations_at_end.feature b/mod/lesson/tests/behat/lesson_informations_at_end.feature index 63bcbee46fa..913f2c8461c 100644 --- a/mod/lesson/tests/behat/lesson_informations_at_end.feature +++ b/mod/lesson/tests/behat/lesson_informations_at_end.feature @@ -34,19 +34,9 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should | Maximum grade | 75 | | Custom scoring | No | And I press "Save and display" - And I am on "Course 1" course homepage with editing mode on - And I duplicate "Test lesson name" activity - And I wait until section "1" is available - And I am on the "Test lesson name (copy)" "lesson activity editing" page - And I set the field "Name" to "Test lesson name 2" - And I set the field "grade[modgrade_type]" to "Scale" - And I set the field "Scale" to "Test Scale" - And I press "Save and return to course" - And I log out - And I log in as "student1" Scenario: Informations at end of lesson if custom scoring not enabled - Given I am on the "Test lesson name" "lesson activity" page + Given I am on the "Test lesson name" "lesson activity" page logged in as student1 And I should see "First page contents" When I press "Next page" And I should see "1 + 1?" @@ -65,7 +55,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should Given the following "language customisations" exist: | component | stringid | value | | core_langconfig | decsep | # | - And I am on the "Test lesson name" "lesson activity" page + And I am on the "Test lesson name" "lesson activity" page logged in as student1 And I should see "First page contents" When I press "Next page" And I should see "1 + 1?" @@ -81,8 +71,12 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should And I should see "Your current grade is 0#0 out of 75" Scenario: Current grade is displayed at end of lesson when grade type is set to scale - Given I am on the "Test lesson name 2" "lesson activity" page - When I press "Next page" + Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1 + And I set the field "grade[modgrade_type]" to "Scale" + And I set the field "Scale" to "Test Scale" + And I press "Save and return to course" + When I am on the "Test lesson name" "lesson activity" page logged in as student1 + And I press "Next page" And I should see "1 + 1?" And I set the following fields to these values: | Your answer | 2 |