MDL-71913 mod_data: Update behat tests

This commit is contained in:
Mihail Geshoski
2021-10-14 21:57:52 +07:00
committed by Ilya Tregubov
parent 43a8c38f33
commit 242ec0860a
2 changed files with 17 additions and 18 deletions
@@ -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
@@ -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