Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @javascript @core_form
2
Feature: disabledIf functionality in forms
3
  For forms including disabledIf functions
4
  As a user
5
  If I trigger the disabledIf condition then the form elements will be disabled
6
 
7
  Background:
8
    Given I log in as "admin"
9
 
10
  Scenario: The file manager is disabled when disabledIf conditions are met
11
    Given I am on fixture page "/lib/form/tests/behat/fixtures/filemanager_hideif_disabledif_form.php"
12
    When I click on "Disable" "radio"
13
    # Test standard file manager.
14
    Then the "disabled" attribute of "input#id_some_filemanager" "css_element" should contain "true"
15
    # Test file manager in a group.
16
    And the "disabled" attribute of "input#id_filemanager_group_some_filemanager_group" "css_element" should contain "true"
11 efrain 17
 
18
  Scenario: The static element is disabled when 'eq' disabledIf conditions are met
19
    Given I am on fixture page "/lib/form/tests/behat/fixtures/static_hideif_disabledif_form.php"
20
    And I should see "Static with form elements"
21
    When I click on "Disable" "radio"
22
    And the "class" attribute of "#fitem_id_some_static" "css_element" should contain "text-muted"
23
    And the "disabled" attribute of "input#id_some_static_username" "css_element" should contain "true"
24
    And the "disabled" attribute of "Check" "button" should contain "true"
25
    Then I click on "Enable" "radio"
26
    And the "class" attribute of "#fitem_id_some_static" "css_element" should not contain "text-muted"
27
    And the "#id_some_static_username" "css_element" should be enabled
28
    And the "class" attribute of "Check" "button" should not contain "disabled"