diff --git a/completion/tests/behat/custom_completion_display_conditions.feature b/completion/tests/behat/custom_completion_display_conditions.feature index 3ab7d2fdfda..783690b739c 100644 --- a/completion/tests/behat/custom_completion_display_conditions.feature +++ b/completion/tests/behat/custom_completion_display_conditions.feature @@ -21,13 +21,16 @@ Feature: Allow teachers to edit the visibility of completion conditions in a cou Scenario: Completion condition displaying for manual and auto completion Given I log in as "teacher1" - And I am on "Course 1" course homepage + When I am on "Course 1" course homepage + # The manual completion toggle button should be always displayed in both course homepage and activity view. + Then the manual completion button for "Test choice manual" should be disabled And I follow "Test choice manual" - And I should see "Mark as done" + And the manual completion button for "Test choice manual" should be disabled + # Automatic completion conditions should be displayed on both activity view page and course homepage if show completion conditions is enabled. And I am on "Course 1" course homepage - When I follow "Test choice auto" - Then I should see "Make a choice" in the "[data-region=completionrequirements]" "css_element" - # TODO MDL-70821: Check completion conditions display on course homepage. + And "Test choice auto" should have the "Make a choice" completion condition + And I follow "Test choice auto" + And "Test choice auto" should have the "Make a choice" completion condition Scenario: Completion condition displaying setting can be disabled at course level Given I log in as "teacher1" @@ -36,12 +39,16 @@ Feature: Allow teachers to edit the visibility of completion conditions in a cou When I set the following fields to these values: | Show completion conditions | No | And I click on "Save and display" "button" + # Automatic completion conditions should not be displayed on the course homepage if show completion conditions is disabled. + And there should be no completion information shown for "Test choice auto" + # Completion conditions are always shown in the module's view page. And I follow "Test choice auto" - # Completion conditions are always shown in the module's view page. - Then I should see "Make a choice" in the "[data-region=completionrequirements]" "css_element" + Then "Test choice auto" should have the "Make a choice" completion condition + # The manual completion toggle button should be always displayed in both course homepage and activity view. And I am on "Course 1" course homepage + And the manual completion button for "Test choice manual" should be disabled And I follow "Test choice manual" - And I should see "Mark as done" + And the manual completion button for "Test choice manual" should be disabled Scenario: Default show completion conditions value in course form when default show completion conditions admin setting is set to No Given I log in as "admin"