Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@editor @editor_atto @atto @atto_link @_file_upload
2
Feature: Add links to Atto
3
  To write rich text - I need to add links.
4
 
5
  @javascript
6
  Scenario: Insert a links
7
    Given the following "blocks" exist:
8
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
9
      | private_files | System       | 1         | my-index        | side-post     |
10
    And I log in as "admin"
11
    And I follow "Manage private files..."
12
    And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
13
    And I click on "Save changes" "button"
14
    When I open my profile in edit mode
15
    And I set the field "Description" to "Super cool"
16
    And I select the text in the "Description" Atto editor
17
    And I click on "Link" "button"
18
    Then the field "Text to display" matches value "Super cool"
19
    And I click on "Browse repositories..." "button"
20
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
21
    And I click on "moodle-logo.png" "link"
22
    And I click on "Select this file" "button"
23
    And I click on "Update profile" "button"
24
    And I follow "Preferences" in the user menu
25
    And I follow "Editor preferences"
26
    And I set the field "Text editor" to "Plain text area"
27
    And I press "Save changes"
28
    And I click on "Edit profile" "link" in the "region-main" "region"
29
    And I should see "Super cool</a>"
30
 
31
  @javascript
32
  Scenario: Insert a link without providing text to display
33
    Given I log in as "admin"
34
    When I open my profile in edit mode
35
    And I click on "Link" "button"
36
    And I set the field "Enter a URL" to "https://moodle.org/"
37
    Then the field "Text to display" matches value "https://moodle.org/"
38
    And I click on "Create link" "button"
39
    And I should see "https://moodle.org/"
40
    And I click on "Link" "button"
41
    And the field "Text to display" matches value "https://moodle.org/"
42
    And the field "Enter a URL" matches value "https://moodle.org/"
43
    And I click on "Close" "button" in the "Create link" "dialogue"
44
    And I click on "Show more buttons" "button"
45
    And I click on "HTML" "button"
46
    And I should see "https://moodle.org/</a>"
47
 
48
  @javascript
49
  Scenario: Insert a link with providing text to display
50
    Given I log in as "admin"
51
    When I open my profile in edit mode
52
    And I click on "Link" "button"
53
    And I set the field "Text to display" to "Moodle - Open-source learning platform"
54
    And I set the field "Enter a URL" to "https://moodle.org/"
55
    And I click on "Create link" "button"
56
    Then I should see "Moodle - Open-source learning platform"
57
    And I click on "Link" "button"
58
    And the field "Text to display" matches value "Moodle - Open-source learning platform"
59
    And the field "Enter a URL" matches value "https://moodle.org/"
60
    And I click on "Close" "button" in the "Create link" "dialogue"
61
    And I click on "Show more buttons" "button"
62
    And I click on "HTML" "button"
63
    And I should see "Moodle - Open-source learning platform</a>"
64
    And I should not see "https://moodle.org/</a>"
65
 
66
  @javascript
67
  Scenario: Edit a link that already had a custom text to display
68
    Given I log in as "admin"
69
    And I follow "Preferences" in the user menu
70
    And I follow "Editor preferences"
71
    And I set the field "Text editor" to "Plain text area"
72
    And I press "Save changes"
73
    And I click on "Edit profile" "link" in the "region-main" "region"
74
    And I set the field "Description" to "<a href=\"https://moodle.org/\">Moodle - Open-source learning platform</a>"
75
    And I click on "Update profile" "button"
76
    And I follow "Preferences" in the user menu
77
    And I follow "Editor preferences"
78
    And I set the field "Text editor" to "Atto HTML editor"
79
    And I press "Save changes"
80
    When I click on "Edit profile" "link" in the "region-main" "region"
81
    Then I should see "Moodle - Open-source learning platform"
82
    And I click on "Link" "button"
83
    And the field "Text to display" matches value "Moodle - Open-source learning platform"
84
    And the field "Enter a URL" matches value "https://moodle.org/"
85
 
86
  @javascript
87
  Scenario: Insert a link for an image
88
    Given I log in as "admin"
89
    And I follow "Private files" in the user menu
90
    And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
91
    And I click on "Save changes" "button"
92
    And I open my profile in edit mode
93
    And I click on "Insert or edit image" "button"
94
    And I click on "Browse repositories..." "button"
95
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
96
    And I click on "moodle-logo.png" "link"
97
    And I click on "Select this file" "button"
98
    And I set the field "Describe this image for someone who cannot see it" to "It's the Moodle"
99
    And I press "Save image"
100
    And I select the text in the "Description" Atto editor
101
    And I press the right key
102
    And I press the shift left key
103
    And I click on "Link" "button"
104
    And I set the field "Enter a URL" to "https://moodle.org/"
105
    And I set the field "Text to display" to "Moodle - Open-source learning platform"
106
    And I click on "Create link" "button"
107
    When I click on "Show more buttons" "button"
108
    And I click on "HTML" "button"
109
    Then I should see "<a href=\"https://moodle.org/\" title=\"Moodle - Open-source learning platform\"><img"
110
    And I click on "HTML" "button"
111
    And I select the text in the "Description" Atto editor
112
    And I press the shift left key
113
    And I click on "Insert or edit image" "button"
114
    And the field "Describe this image for someone who cannot see it" matches value "It's the Moodle"
115
    And I click on "Close" "button" in the "Image properties" "dialogue"
116
    And I click on "Link" "button"
117
    And the field "Text to display" matches value "Moodle - Open-source learning platform"
118
    And the field "Enter a URL" matches value "https://moodle.org/"