[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @tool @tool_availabilityconditions 2 Feature: Manage availability conditions 3 In order to control availability restrictions 4 As an administrator 5 I need to see the list of restrictions and hide or show them 6 7 @javascript 8 Scenario: Display list of availability conditions 9 # Check the report doesn't show when not enabled. 10 Given I log in as "admin" 11 And I expand "Site administration" node 12 When I expand "Plugins" node 13 Then I should not see "Availability restrictions" 14 15 # Enable it and check I can now see and click on it. 16 And I set the following administration settings values: 17 | Enable conditional access | 1 | 18 And I am on homepage 19 And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" 20 21 # Having clicked on it, I should also see the list of plugins. 22 And I should see "Restriction by date" 23 And I should see "Restriction by grades" 24 25 @javascript 26 Scenario: Hide and show conditions 27 # Get to the right page 28 Given the following "courses" exist: 29 | fullname | shortname | format | 30 | Course 1 | C1 | topics | 31 And I log in as "admin" 32 And I set the following administration settings values: 33 | Enable conditional access | 1 | 34 And I am on homepage 35 When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" 36 37 # Check the icon is there (it should be a Hide icon, meaning is currently visible). 38 Then "input[title=Hide]" "css_element" should exist in the "Restriction by date" "table_row" 39 40 # Click the icon. It should toggle to hidden (title=Show). 41 And I click on "input[title=Hide]" "css_element" in the "Restriction by date" "table_row" 42 And "input[title=Show]" "css_element" should exist in the "Restriction by date" "table_row" 43 44 # Toggle it back to visible (title=Hide). 45 And I click on "input[title=Show]" "css_element" in the "Restriction by date" "table_row" 46 And "input[title=Hide]" "css_element" should exist in the "Restriction by date" "table_row" 47 48 # OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked. 49 And I click on "input[title=Hide]" "css_element" in the "Restriction by grade" "table_row" 50 And I am on homepage 51 And I follow "Course 1" 52 And I turn editing mode on 53 And I add a "Page" to section "1" 54 And I expand all fieldsets 55 And I click on "Add restriction..." "button" 56 And "Add restriction..." "dialogue" should be visible 57 And "Date" "button" should exist in the "Add restriction..." "dialogue" 58 And "Grade" "button" should not exist in the "Add restriction..." "dialogue"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |