[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @availability @availability_completion 2 Feature: Confirm that conditions on completion no longer cause a bug 3 In order to use completion conditions 4 As a teacher 5 I need it to not break when I set up certain conditions on some modules 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | format | 10 | Course 1 | C1 | topics | 11 And the following "users" exist: 12 | username | 13 | teacher1 | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 18 @javascript 19 Scenario: Multiple completion conditions on glossary 20 # Set up course. 21 Given I log in as "teacher1" 22 And I follow "Course 1" 23 And I navigate to "Edit settings" node in "Course administration" 24 And I expand all fieldsets 25 And I set the field "Enable completion tracking" to "Yes" 26 And I press "Save and display" 27 And I turn editing mode on 28 29 # Add a couple of Pages with manual completion. 30 And I add a "Page" to section "1" and I fill the form with: 31 | Name | Page1 | 32 | Page content | x | 33 And I add a "Page" to section "1" and I fill the form with: 34 | Name | Page2 | 35 | Page content | x | 36 37 # Add a Glossary. 38 When I add a "Glossary" to section "1" 39 And I set the following fields to these values: 40 | Name | TestGlossary | 41 And I expand all fieldsets 42 43 # Add restrictions to the previous Pages being complete. 44 And I press "Add restriction..." 45 And I click on "Activity completion" "button" in the "Add restriction..." "dialogue" 46 And I set the field "Activity or resource" to "Page1" 47 And I press "Add restriction..." 48 And I click on "Activity completion" "button" in the "Add restriction..." "dialogue" 49 And I set the field with xpath "//div[@class='availability-item'][preceding-sibling::div]//select[@name='cm']" to "Page2" 50 And I press "Save and return to course" 51 And I should see "Not available unless:" in the ".activity.glossary" "css_element" 52 And I should see "The activity Page1 is marked complete" in the ".activity.glossary" "css_element" 53 And I should see "The activity Page2 is marked complete" in the ".activity.glossary" "css_element" 54 And I follow "TestGlossary" 55 56 # Behat will automatically check there is no error on this page. 57 Then I should see "TestGlossary"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |