Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@editor @editor_atto @atto @editor_moodleform
2
Feature: Atto with enable/disable function.
3
  In order to test enable/disable function
4
  I create a sample page to test this feature.
5
  As a user
6
  I need to enable/disable all buttons/plugins and 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 Atto</a> | C1     | label1   |
15
    And I log in as "admin"
16
    And I am on "Course 1" course homepage
17
    And I click on "Control Enable/Disable Atto" "link" in the "region-main" "region"
18
 
19
  @javascript
20
  Scenario: Check disable Atto editor.
21
    When I set the field "mycontrol" to "Disable"
22
    Then the "disabled" attribute of "button.atto_collapse_button" "css_element" should be set
23
    And the "disabled" attribute of "button.atto_title_button" "css_element" should be set
24
    And the "disabled" attribute of "button.atto_bold_button" "css_element" should be set
25
    And the "disabled" attribute of "button.atto_italic_button" "css_element" should be set
26
    And the "disabled" attribute of "button.atto_unorderedlist_button_insertUnorderedList" "css_element" should be set
27
    And the "disabled" attribute of "button.atto_orderedlist_button_insertOrderedList" "css_element" should be set
28
    And the "disabled" attribute of "button.atto_link_button" "css_element" should be set
29
    And the "disabled" attribute of "button.atto_link_button_unlink" "css_element" should be set
30
    And the "disabled" attribute of "button.atto_image_button" "css_element" should be set
31
    And the "contenteditable" attribute of "div#id_myeditoreditable" "css_element" should contain "false"
32
 
33
  @javascript
34
  Scenario: Check enable Atto editor.
35
    When I set the field "mycontrol" to "Enable"
36
    Then the "disabled" attribute of "button.atto_collapse_button" "css_element" should not be set
37
    And the "disabled" attribute of "button.atto_title_button" "css_element" should not be set
38
    And the "disabled" attribute of "button.atto_bold_button" "css_element" should not be set
39
    And the "disabled" attribute of "button.atto_italic_button" "css_element" should not be set
40
    And the "disabled" attribute of "button.atto_unorderedlist_button_insertUnorderedList" "css_element" should not be set
41
    And the "disabled" attribute of "button.atto_orderedlist_button_insertOrderedList" "css_element" should not be set
42
    And the "disabled" attribute of "button.atto_link_button" "css_element" should not be set
43
    And the "disabled" attribute of "button.atto_link_button_unlink" "css_element" should not be set
44
    And the "disabled" attribute of "button.atto_image_button" "css_element" should not be set
45
    And the "contenteditable" attribute of "div#id_myeditoreditable" "css_element" should contain "true"