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
@editor @editor_tiny @tiny_media @javascript
2
Feature: Use the TinyMCE editor to upload an image
3
  In order to work with images
4
  As a user
5
  I need to be able to upload and manipulate images
6
 
7
  Scenario: Clicking on the Image button in the TinyMCE editor opens the image dialog
8
    Given I log in as "admin"
9
    And I open my profile in edit mode
10
    When I click on the "Image" button for the "Description" TinyMCE editor
11
    Then "Insert image" "dialogue" should exist
12
 
13
  Scenario: Browsing repositories in the TinyMCE editor opens the image dialog and shows the FilePicker
14
    Given I log in as "admin"
15
    And I open my profile in edit mode
16
    When I click on the "Image" button for the "Description" TinyMCE editor
17
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
18
    Then "File picker" "dialogue" should exist
19
 
20
  @_file_upload @test_tiny
21
  Scenario: Browsing repositories in the TinyMCE editor shows the FilePicker and upload url image
22
    Given I log in as "admin"
23
    And I open my profile in edit mode
24
    When I click on the "Image" button for the "Description" TinyMCE editor
25
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
26
    And I upload "/lib/editor/tiny/tests/behat/fixtures/tinyscreenshot.png" to the file picker for TinyMCE
27
    # Note: This needs to be replaced with a label.
28
    Then ".tiny_image_preview" "css_element" should be visible
29
 
30
  @_file_upload
31
  Scenario: Insert image to the TinyMCE editor
32
    Given I log in as "admin"
33
    And I open my profile in edit mode
34
    And I click on the "Image" button for the "Description" TinyMCE editor
35
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
36
    And I upload "lib/editor/tiny/tests/behat/fixtures/moodle-logo.png" to the file picker for TinyMCE
11 efrain 37
    And I set the field "How would you describe this image to someone who can't see it?" to "It's the Moodle"
1 efrain 38
    And I click on "Save" "button" in the "Image details" "dialogue"
39
    When I select the "img" element in position "0" of the "Description" TinyMCE editor
40
    And I click on the "Image" button for the "Description" TinyMCE editor
11 efrain 41
    Then the field "How would you describe this image to someone who can't see it?" matches value "It's the Moodle"
1 efrain 42
    # Note: This needs to be replaced with a label.
43
    And ".tiny_image_preview" "css_element" should be visible
44
 
45
  @_file_upload
46
  Scenario: Resizing the image uses the original and custom sizes and the keep proportion checkbox
47
    Given I log in as "admin"
48
    And I open my profile in edit mode
49
    And I click on the "Image" button for the "Description" TinyMCE editor
50
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
51
    And I upload "lib/editor/tiny/tests/behat/fixtures/moodle-logo.png" to the file picker for TinyMCE
52
    And I click on "This image is decorative only" "checkbox"
53
    And I click on "Save" "button" in the "Image details" "dialogue"
54
    When I select the "img" element in position "0" of the "Description" TinyMCE editor
55
    And I click on the "Image" button for the "Description" TinyMCE editor
56
    Then the field "Original size" matches value "1"
57
    And I click on "Custom size" "radio"
58
    Then the field "Keep proportion" matches value "1"
59
    And I click on "Keep proportion" "checkbox"
60
    And I set the field "Width" to "102"
61
    And I click on "Save" "button" in the "Image details" "dialogue"
62
    When I select the "img" element in position "0" of the "Description" TinyMCE editor
63
    And I click on the "Image" button for the "Description" TinyMCE editor
64
    Then the field "Custom size" matches value "1"
65
    And the field "Width" matches value "102"
66
    And the field "Keep proportion" matches value "0"