From 242ec0860a6e2dd79ebc35e2e37ddf0f33c2c818 Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Thu, 14 Oct 2021 10:16:54 +0800 Subject: [PATCH] MDL-71913 mod_data: Update behat tests --- .../behat/data_activity_completion.feature | 1 + ...ata_activity_completion_pass_grade.feature | 34 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/mod/data/tests/behat/data_activity_completion.feature b/mod/data/tests/behat/data_activity_completion.feature index 43a0e23df55..e8e9b460b82 100644 --- a/mod/data/tests/behat/data_activity_completion.feature +++ b/mod/data/tests/behat/data_activity_completion.feature @@ -37,6 +37,7 @@ Feature: View activity completion in the database activity And I add a "Text input" field to "Music history" database and I fill the form with: | Field name | Instrument types | And I navigate to "Templates" in current page administration + And I press "Save template" And I log out Scenario: View automatic completion items as a teacher and confirm all tabs display conditions diff --git a/mod/data/tests/behat/data_activity_completion_pass_grade.feature b/mod/data/tests/behat/data_activity_completion_pass_grade.feature index f9230954f2c..3956949b507 100644 --- a/mod/data/tests/behat/data_activity_completion_pass_grade.feature +++ b/mod/data/tests/behat/data_activity_completion_pass_grade.feature @@ -50,7 +50,7 @@ Feature: Completion pass grade And I press "Save and display" And I add a "Text input" field to "Music history" database and I fill the form with: | Field name | Instrument types | - And I follow "Templates" + And I navigate to "Templates" in current page administration And I press "Save template" And I log out @@ -62,37 +62,35 @@ Feature: Completion pass grade And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition And "Music history" should have the "Receive a passing grade" completion condition - And I follow "View single" + And I select "Single view" from the "jump" singleselect And "Music history" should have the "View" completion condition And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition And "Music history" should have the "Receive a passing grade" completion condition - And I follow "Search" + And I press "Add entry" And "Music history" should have the "View" completion condition And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition And "Music history" should have the "Receive a passing grade" completion condition - And I follow "Add entry" + And I set the following fields to these values: + | Instrument types | Hurdygurdy | + And I press "Save" + And I press "Export entries" And "Music history" should have the "View" completion condition And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition And "Music history" should have the "Receive a passing grade" completion condition - And I follow "Export" + And I navigate to "Templates" in current page administration And "Music history" should have the "View" completion condition And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition And "Music history" should have the "Receive a passing grade" completion condition - And I follow "Templates" + And I navigate to "Fields" in current page administration And "Music history" should have the "View" completion condition And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition And "Music history" should have the "Receive a passing grade" completion condition - And I follow "Fields" - And "Music history" should have the "View" completion condition - And "Music history" should have the "Make entries: 2" completion condition - And "Music history" should have the "Receive a grade" completion condition - And "Music history" should have the "Receive a passing grade" completion condition - And I follow "Presets" + And I navigate to "Presets" in current page administration And "Music history" should have the "View" completion condition And "Music history" should have the "Make entries: 2" completion condition And "Music history" should have the "Receive a grade" completion condition @@ -108,7 +106,7 @@ Feature: Completion pass grade And I am on "Course 1" course homepage And I add an entry to "Music history" database with: | Instrument types | Drums | - And I press "Save and view" + And I press "Save" # One entry is not enough to mark as complete. And the "View" completion condition of "Music history" is displayed as "done" And the "Make entries: 2" completion condition of "Music history" is displayed as "todo" @@ -117,14 +115,14 @@ Feature: Completion pass grade And I am on "Course 1" course homepage And I add an entry to "Music history" database with: | Instrument types | Hurdygurdy | - And I press "Save and view" + And I press "Save" Then the "View" completion condition of "Music history" is displayed as "done" And the "Make entries: 2" completion condition of "Music history" is displayed as "done" And the "Receive a grade" completion condition of "Music history" is displayed as "todo" And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo" And I log out And I am on the "Music history" "data activity" page logged in as teacher1 - And I follow "View single" + And I select "Single view" from the "jump" singleselect And I set the field "rating" to "3" And I log out When I am on the "Music history" "data activity" page logged in as student1 @@ -147,7 +145,7 @@ Feature: Completion pass grade And I am on "Course 1" course homepage And I add an entry to "Music history" database with: | Instrument types | Drums | - And I press "Save and view" + And I press "Save" # One entry is not enough to mark as complete. And the "View" completion condition of "Music history" is displayed as "done" And the "Make entries: 2" completion condition of "Music history" is displayed as "todo" @@ -156,14 +154,14 @@ Feature: Completion pass grade And I am on "Course 1" course homepage And I add an entry to "Music history" database with: | Instrument types | Hurdygurdy | - And I press "Save and view" + And I press "Save" And the "View" completion condition of "Music history" is displayed as "done" And the "Make entries: 2" completion condition of "Music history" is displayed as "done" And the "Receive a grade" completion condition of "Music history" is displayed as "todo" And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo" And I log out And I am on the "Music history" "data activity" page logged in as teacher1 - And I follow "View single" + And I select "Single view" from the "jump" singleselect And I set the field "rating" to "60" And I log out When I am on the "Music history" "data activity" page logged in as student1