Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@editor @editor_textarea @texarea @editor_moodleform
2
Feature: Text area with enable/disable function.
3
  In order to test enable/disable function
4
  I set default editor is Text area editor, and I create a sample page to test this feature.
5
  As a user
6
  I need to enable/disable content of editor if "enable/disable" feature enabled.
7
 
8
  Background:
9
    Given the following "courses" exist:
10
      | fullname | shortname | format |
11
      | Course 1 | C1        | topics |
12
    And the following "activities" exist:
13
      | activity | name | intro                                                                                                   | course | idnumber |
14
      | label    | L1   | <a href="../lib/editor/tests/fixtures/disable_control_example.php">Control Enable/Disable Text area</a> | C1     | label1   |
15
    And I log in as "admin"
16
    And I follow "Preferences" in the user menu
17
    And I follow "Editor preferences"
18
    And I set the field "Text editor" to "Plain text area"
19
    And I press "Save changes"
20
    And I am on "Course 1" course homepage
21
    And I click on "Control Enable/Disable Text area" "link" in the "region-main" "region"
22
 
23
  @javascript
24
  Scenario: Check disable Text area editor.
25
    When I set the field "mycontrol" to "Disable"
26
    Then the "readonly" attribute of "textarea#id_myeditor" "css_element" should be set
27
 
28
  @javascript
29
  Scenario: Check enable Text area editor.
30
    When I set the field "mycontrol" to "Enable"
31
    Then the "readonly" attribute of "textarea#id_myeditor" "css_element" should not be set