Rev 1 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_course @core_courseformatFeature: Course index completion iconsIn order to quickly check my activities completionsAs a studentI need to see the activity completion in the course index.Background:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com |And the following "course" exists:| fullname | Course 1 || shortname | C1 || category | 0 || enablecompletion | 1 || numsections | 4 |And the following "activities" exist:| activity | name | intro | course | idnumber | section | completion || assign | Activity sample 1 | Test assignment description | C1 | sample1 | 1 | 1 |And the following "course enrolments" exist:| user | course | role || student1 | C1 | student || teacher1 | C1 | editingteacher |# The course index is hidden by default in small devices.And I change window size to "large"@javascriptScenario: Teacher does not see completion icons.When I am on the "C1" "Course" page logged in as "teacher1"Then I should see "New section" in the "courseindex-content" "region"And I should see "Activity sample 1" in the "courseindex-content" "region"And "To do" "icon" should not exist in the "courseindex-content" "region"@javascriptScenario: User should see the completion iconsWhen I am on the "C1" "Course" page logged in as "student1"Then I should see "New section" in the "courseindex-content" "region"And I should see "Activity sample 1" in the "courseindex-content" "region"And "To do" "icon" should exist in the "courseindex-content" "region"@javascriptScenario: Manual completion should update the course index completionGiven I am on the "C1" "Course" page logged in as "student1"And "To do" "icon" should exist in the "courseindex-content" "region"# Mark an uncompleted activity as completed.When I press "Mark as done"And I wait until "Done" "button" existsThen "Done" "icon" should exist in the "courseindex-content" "region"And I press "Done"And I wait until "Mark as done" "button" existsAnd "To do" "icon" should exist in the "courseindex-content" "region"# Mark an completed activity as uncompleted (to discard any possible JS dependency, see MDL-84243).And I press "Mark as done"And I wait until "Done" "button" existsAnd I reload the pageAnd "Done" "icon" should exist in the "courseindex-content" "region"And I press "Done"And I wait until "Mark as done" "button" existsAnd "To do" "icon" should exist in the "courseindex-content" "region"And I press "Mark as done"And I wait until "Done" "button" existsThen "Done" "icon" should exist in the "courseindex-content" "region"@javascriptScenario: Manual completion in an activity page should update the course indexGiven I am on the "sample1" "Activity" page logged in as "student1"And "To do" "icon" should exist in the "courseindex-content" "region"When I press "Mark as done"And I wait until "Done" "button" existsThen "Done" "icon" should exist in the "courseindex-content" "region"And I press "Done"And I wait until "Mark as done" "button" existsAnd "To do" "icon" should exist in the "courseindex-content" "region"@javascriptScenario: Refresh the page should keep the completion consistentGiven I am on the "C1" "Course" page logged in as "student1"And "To do" "icon" should exist in the "courseindex-content" "region"When I press "Mark as done"And I wait until "Done" "button" existsAnd I reload the pageThen the manual completion button of "Activity sample 1" is displayed as "Done"@javascriptScenario: Auto completion should appear in the course indexGiven the following "activities" exist:| activity | name | intro | course | idnumber | section | completion | completionview || assign | Activity sample 2 | Test assignment description | C1 | sample2 | 1 | 1 | 1 |When I am on the "sample2" "Activity" page logged in as "student1"And I am on the "C1" "Course" pageThen "Done" "icon" should exist in the "courseindex-content" "region"@javascriptScenario: Completion failed should appear in the course indexGiven the following "question categories" exist:| contextlevel | reference | name || Course | C1 | Test questions |And the following "questions" exist:| questioncategory | qtype | name | questiontext || Test questions | truefalse | First question | Answer the first question |And the following "activities" exist:| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpassgrade | completionattemptsexhausted || quiz | Test quiz name | C1 | quiz1 | 1 | 5.00 | 2 | 1 | 1 | 1 |And quiz "Test quiz name" contains the following questions:| question | page || First question | 1 |And user "student1" has attempted "Test quiz name" with responses:| slot | response || 1 | False |When I am on the "C1" "Course" page logged in as "student1"And "Failed" "icon" should exist in the "courseindex-content" "region"@javascriptScenario: Completion passed should appear in the course indexGiven the following "question categories" exist:| contextlevel | reference | name || Course | C1 | Test questions |And the following "questions" exist:| questioncategory | qtype | name | questiontext || Test questions | truefalse | First question | Answer the first question |And the following "activities" exist:| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpassgrade | completionattemptsexhausted || quiz | Test quiz name | C1 | quiz1 | 1 | 5.00 | 2 | 1 | 1 | 1 |And quiz "Test quiz name" contains the following questions:| question | page || First question | 1 |And user "student1" has attempted "Test quiz name" with responses:| slot | response || 1 | True |When I am on the "C1" "Course" page logged in as "student1"And "Done" "icon" should exist in the "courseindex-content" "region"@javascriptScenario: Completion done should appear in the course index when the requirement is any gradeGiven the following "question categories" exist:| contextlevel | reference | name || Course | C1 | Test questions |And the following "questions" exist:| questioncategory | qtype | name | questiontext || Test questions | truefalse | First question | Answer the first question |And the following "activities" exist:| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpassgrade || quiz | Test quiz name | C1 | quiz1 | 1 | 5.00 | 2 | 1 | 0 |And quiz "Test quiz name" contains the following questions:| question | page || First question | 1 |And user "student1" has attempted "Test quiz name" with responses:| slot | response || 1 | False |When I am on the "C1" "Course" page logged in as "student1"And "Done" "icon" should exist in the "courseindex-content" "region"