diff --git a/mod/wiki/tests/behat/wiki_activity_completion.feature b/mod/wiki/tests/behat/wiki_activity_completion.feature index 43176b05e6c..ea474417729 100644 --- a/mod/wiki/tests/behat/wiki_activity_completion.feature +++ b/mod/wiki/tests/behat/wiki_activity_completion.feature @@ -1,8 +1,8 @@ -@mod @mod_url @core_completion +@mod @mod_wiki @core_completion Feature: View activity completion information in the Wiki activity - In order to have visibility of URL completion requirements + In order to have visibility of wiki completion requirements As a student - I need to be able to view my URL completion progress + I need to be able to view my wiki completion progress Background: Given the following "users" exist: @@ -24,35 +24,52 @@ Feature: View activity completion information in the Wiki activity | Enable completion tracking | Yes | | Show completion conditions | Yes | And I press "Save and display" - - Scenario: View automatic completion items - Given I am on "Course 1" course homepage with editing mode on - And I add a "Wiki" to section "1" and I fill the form with: - | Wiki name | Music history | - | First page name | Respect | - | Completion tracking | Show activity as complete when conditions are met | - | Require view | 1 | - # Teacher view. - And I follow "Music history" - And I click on "Create page" "button" - And "Music history" should have the "View" completion condition - And I log out - # Student view. - When I log in as "student1" + And the following "activity" exists: + | activity | wiki | + | course | C1 | + | idnumber | mh1 | + | name | Music history | + | section | 1 | + | completion | 2 | + | completionview | 1 | And I am on "Course 1" course homepage And I follow "Music history" - And the "View" completion condition of "Music history" is displayed as "done" + And I click on "Create page" "button" + And I log out + + Scenario: View automatic completion items as a teacher and confirm all tabs display conditions + Given I log in as "teacher1" + And I am on "Course 1" course homepage + When I follow "Music history" + Then "Music history" should have the "View" completion condition + And I click on "Edit" "link" in the "region-main" "region" + And "Music history" should have the "View" completion condition + And I follow "Comments" + And "Music history" should have the "View" completion condition + And I follow "Map" + And "Music history" should have the "View" completion condition + And I follow "Files" + And "Music history" should have the "View" completion condition + And I follow "Administration" + And "Music history" should have the "View" completion condition + + Scenario: View automatic completion items as a student + Given I log in as "student1" + When I am on "Course 1" course homepage + And I follow "Music history" + Then the "View" completion condition of "Music history" is displayed as "done" @javascript Scenario: Use manual completion - Given I am on "Course 1" course homepage with editing mode on - And I add a "Wiki" to section "1" and I fill the form with: - | Wiki name | Music history | - | First page name | Respect | - | Completion tracking | Students can manually mark the activity as completed | - # Teacher view. + Given I log in as "teacher1" + And I am on "Course 1" course homepage And I follow "Music history" - And I click on "Create page" "button" + And I navigate to "Edit settings" in current page administration + And I expand all fieldsets + And I press "Unlock completion options" + And I set the field "Completion tracking" to "Students can manually mark the activity as completed" + And I press "Save and display" + # Teacher view. And the manual completion button for "Music history" should be disabled And I log out # Student view.