[ Index ] |
PHP Cross Reference of Unnamed Project |
[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 the following config values are set as admin: 12 | enableavailability | 0 | 13 And I expand "Site administration" node 14 When I expand "Plugins" node 15 Then I should not see "Availability restrictions" 16 17 # Enable it and check I can now see and click on it. 18 And the following config values are set as admin: 19 | enableavailability | 1 | 20 And I am on homepage 21 And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" 22 23 # Having clicked on it, I should also see the list of plugins. 24 And I should see "Restriction by date" 25 And I should see "Restriction by grades" 26 27 @javascript 28 Scenario: Hide and show conditions 29 # Get to the right page 30 Given the following "courses" exist: 31 | fullname | shortname | format | 32 | Course 1 | C1 | topics | 33 And I log in as "admin" 34 And I am on site 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 site 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: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |