This commit is contained in:
Jun Pataleta
2022-03-21 17:13:55 +08:00
2 changed files with 28 additions and 6 deletions
@@ -27,7 +27,7 @@ Feature: View activity completion in the lesson activity
| completionusegrade | 1 |
| completionendreached | 1 |
| completiontimespentenabled | 1 |
| completiontimespent | 1 |
| completiontimespent | 3 |
And I am on the "Music history" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
@@ -49,28 +49,28 @@ Feature: View activity completion in the lesson activity
Scenario: View automatic completion items as a teacher
When I am on the "Music history" "lesson activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Spend at least 1 sec on this activity" completion condition
And "Music history" should have the "Spend at least 3 secs on this activity" completion condition
And "Music history" should have the "Go through the activity to the end" completion condition
And "Music history" should have the "Receive a grade" completion condition
Scenario: View automatic completion items as a student
Given I am on the "Music history" "lesson activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "todo"
And the "Spend at least 3 secs on this activity" completion condition of "Music history" is displayed as "todo"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
When I am on the "Music history" "lesson activity" page
And I wait "2" seconds
And I wait "4" seconds
And I reload the page
And the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "done"
And the "Spend at least 3 secs on this activity" completion condition of "Music history" is displayed as "done"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And I press "The history of music part 1"
And I set the field "Your answer" to "Some drummers play with their sticks flipped around"
And I press "Submit"
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "done"
And the "Spend at least 3 secs on this activity" completion condition of "Music history" is displayed as "done"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
@@ -52,26 +52,48 @@ Feature: View activity completion in the SCORM activity
And I press "Enter"
And I switch to the main frame
And I click on "Par?" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I switch to the main frame
And I click on "Keeping Score" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I switch to the main frame
And I click on "Other Scoring Systems" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I switch to the main frame
And I click on "The Rules of Golf" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I switch to the main frame
And I click on "Playing Golf Quiz" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I click on "[id='question_com.scorm.golfsamples.interactions.playing_1_1']" "css_element"
And I press "Submit Answers"
And I wait until "Score: 20" "text" exists
And I switch to the main frame
And I click on "How to Have Fun Playing Golf" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I switch to the main frame
And I click on "How to Make Friends Playing Golf" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I switch to the main frame
And I click on "Having Fun Quiz" "list_item"
And I switch to "scorm_object" iframe
And I wait until the page is ready
And I click on "[id='question_com.scorm.golfsamples.interactions.fun_1_False']" "css_element"
And I press "Submit Answers"
And I wait until "Score: 33" "text" exists
And I switch to the main frame
# We need to get some time till the last item is marked as done (or it won't be ready in slow databases).
# This could be a pause of a few seconds (working ok in super-slow oracle docker database), but forcing a
# reload seems to be doing the work too under that very same slow environment.
And I reload the page
And I wait until the page is ready
When I am on the "Music history" "scorm activity" page
Then the "View" completion condition of "Music history" is displayed as "done"
# Conditions that are not possible to achieve (eg score below requirement but all attempts used) are marked as failed.