Skip to content

Commit

Permalink
MDL-52219 behat: remove steps which turn on avaibility/completion
Browse files Browse the repository at this point in the history
Now its the default, we can reduce test time by relying on the default
state rather than going around turning it on
  • Loading branch information
danpoltawski committed Nov 26, 2015
1 parent e354bf1 commit aa306e7
Show file tree
Hide file tree
Showing 25 changed files with 11 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Feature: Manage availability conditions
Scenario: Display list of availability conditions
# Check the report doesn't show when not enabled.
Given I log in as "admin"
And the following config values are set as admin:
| enableavailability | 0 |
And I expand "Site administration" node
When I expand "Plugins" node
Then I should not see "Availability restrictions"
Expand All @@ -28,8 +30,6 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I am on site homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Feature: availability_completion
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |

@javascript
Scenario: Test condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ Feature: Confirm that conditions on completion no longer cause a bug
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |

@javascript
Scenario: Multiple completion conditions on glossary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: availability_date
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |

@javascript
Scenario: Test condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: availability_grade
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |

@javascript
Scenario: Test condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: availability_group
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |

@javascript
Scenario: Test condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Feature: availability_grouping
And the following "group members" exist:
| user | group |
| student1 | GI1 |
And the following config values are set as admin:
| enableavailability | 1 |

@javascript
Scenario: Test condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: availability_profile
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |

@javascript
Scenario: Test condition
Expand Down
2 changes: 0 additions & 2 deletions availability/tests/behat/display_availability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Feature: display_availability
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |

@javascript
Scenario: Activity availability display
Expand Down
18 changes: 8 additions & 10 deletions availability/tests/behat/edit_availability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Feature: edit_availability
| student1 | C1 | student |

Scenario: Confirm the 'enable availability' option is working
Given the following config values are set as admin:
| enableavailability | 0 |
When I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
Expand All @@ -55,9 +57,7 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in activity form
# Set up.
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"

# Add a Page and check it has None in so far.
Expand Down Expand Up @@ -148,9 +148,7 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in section form
# Set up.
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
Expand All @@ -170,7 +168,9 @@ Feature: edit_availability
@javascript
Scenario: 'Add group/grouping access restriction' button unavailable
# Button does not exist when conditional access restrictions are turned off.
Given I log in as "admin"
Given the following config values are set as admin:
| enableavailability | 0 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
Expand All @@ -181,9 +181,7 @@ Feature: edit_availability
@javascript
Scenario: Use the 'Add group/grouping access restriction' button
# Button should initially be disabled.
Given the following config values are set as admin:
| enableavailability | 1 |
And the following "groupings" exist:
Given the following "groupings" exist:
| name | course | idnumber |
| GX1 | C1 | GXI1 |
And I log in as "admin"
Expand Down
4 changes: 0 additions & 4 deletions badges/tests/behat/award_badge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ Feature: Award badges
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
Expand Down Expand Up @@ -180,8 +178,6 @@ Feature: Award badges
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ Feature: View structural changes in recent activity block
| GG3 | G2 |

Scenario: Check that Added module information is displayed respecting view capability
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
When I add a "Forum" to section "1" and I fill the form with:
Expand Down
3 changes: 0 additions & 3 deletions completion/tests/behat/enable_manual_complete_mark.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ Feature: Allow students to manually mark an activity as complete
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
Expand Down
2 changes: 0 additions & 2 deletions completion/tests/behat/restrict_activity_by_date.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: Restrict activity availability through date conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
Expand Down
2 changes: 0 additions & 2 deletions completion/tests/behat/restrict_activity_by_grade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Feature: Restrict activity availability through grade conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
#And I am on site homepage
And I follow "Course 1"
Expand Down
3 changes: 0 additions & 3 deletions completion/tests/behat/restrict_section_availability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Feature: Restrict sections availability through completion or grade conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |

@javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied
Expand Down
4 changes: 0 additions & 4 deletions completion/tests/behat/teacher_manual_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ Feature: Allow teachers to manually mark users as complete when configured
| user | course | role |
| student1 | CC1 | student |
| teacher1 | CC1 | editingteacher |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I am on site homepage
And I follow "Completion course"
And completion tracking is "Enabled" in current course
Expand Down
2 changes: 0 additions & 2 deletions course/tests/behat/activities_edit_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Feature: Edit completion settings of an activity
Given the following "courses" exist:
| fullname | shortname | enablecompletion |
| Course 1 | C1 | 1 |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
Expand Down
2 changes: 0 additions & 2 deletions mod/feedback/tests/behat/show_nonrespondents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ Feature: Show users who have not responded to the feedback survey
And the following "grouping groups" exist:
| grouping | group |
| GXI1 | GI1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Feature: Set a certain number of discussions as a completion condition for a for
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Feature: As a teacher I need to see an accurate list of subscribed users
And the following "grouping groups" exist:
| grouping | group |
| GG1 | G1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher"
And I follow "Course 1"
And I turn editing mode on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: Set end of lesson reached as a completion condition for a lesson
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Feature: Set time spent as a completion condition for a lesson
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist:
| contextlevel | reference | name |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Feature: Set a quiz to be marked complete when the student passes
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist:
| contextlevel | reference | name |
Expand Down

0 comments on commit aa306e7

Please sign in to comment.