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: hideIf functionality in forms
3
  For forms including hideIf functions
4
  As a user
5
  If I trigger the hideIf condition then the form elements will be hidden
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname |
10
      | Course 1 | C1        |
11
    And I log in as "admin"
12
 
13
  Scenario: When 'eq' hideIf conditions are not met, the relevant elements are shown
14
    When I add an assign activity to course "Course 1" section "1"
15
    And I expand all fieldsets
16
    And I set the field "Students submit in groups" to "Yes"
17
    Then I should see "Require group to make submission"
18
    And I should see "Require all group members submit"
19
    And I should see "Grouping for student groups"
20
 
21
  Scenario: When 'eq' hideIf conditions are met, the relevant elements are hidden
22
    When I add a assign activity to course "Course 1" section "1"
23
    And I expand all fieldsets
24
    And I set the field "Students submit in groups" to "No"
25
    Then I should not see "Require group to make submission"
26
    And I should not see "Require all group members to submit"
27
    And I should not see "Grouping for student groups"
11 efrain 28
 
29
  Scenario: The editor is hidden when 'eq' hideIf conditions are met
30
    Given I am on fixture page "/lib/form/tests/behat/fixtures/editor_hideif_disabledif_form.php"
31
    And I should see "My test editor"
32
    When I click on "Hide" "radio"
33
    Then I should not see "My test editor"
34
 
35
  Scenario: The static element is hidden when 'eq' hideIf conditions are met
36
    Given I am on fixture page "/lib/form/tests/behat/fixtures/static_hideif_disabledif_form.php"
37
    And I should see "Static with form elements"
38
    When I click on "Hide" "radio"
39
    Then I should not see "Static with form elements"
40
    And I click on "Enable" "radio"
41
    And I should see "Static with form elements"