[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/editor/atto/plugins/image/tests/behat/ -> image.feature (source)

   1  @editor @editor_atto @atto @atto_image @_file_upload
   2  Feature: Add images to Atto
   3    To write rich text - I need to add images.
   4  
   5    @javascript
   6    Scenario: Insert an image
   7      Given I log in as "admin"
   8      And I follow "Manage private files..."
   9      And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
  10      And I click on "Save changes" "button"
  11      And I follow "Profile" in the user menu
  12      And I follow "Edit profile"
  13      When I set the field "Description" to "<p>Image test</p>"
  14      And I select the text in the "Description" Atto editor
  15      And I click on "Image" "button"
  16      And I click on "Browse repositories..." "button"
  17      And I click on "Private files" "link"
  18      And I click on "moodle-logo.png" "link"
  19      And I click on "Select this file" "button"
  20      And I set the field "Describe this image for someone who cannot see it" to "It's the Moodle"
  21      # Wait for the page to "settle".
  22      And I wait until the page is ready
  23      And the field "Width" matches value "204"
  24      And the field "Height" matches value "61"
  25      And I set the field "Auto size" to "1"
  26      And I wait until the page is ready
  27      And I set the field "Width" to "2040"
  28      # Trigger blur on the width field.
  29      And I take focus off "Width" "field"
  30      And the field "Height" matches value "610"
  31      And I set the field "Height" to "61"
  32      # Trigger blur on the height field.
  33      And I take focus off "Height" "field"
  34      And the field "Width" matches value "204"
  35      And I set the field "Auto size" to "0"
  36      And I wait until the page is ready
  37      And I set the field "Width" to "123"
  38      And I set the field "Height" to "456"
  39      # Trigger blur on the height field.
  40      And I take focus off "Height" "field"
  41      And the field "Width" matches value "123"
  42      And the field "Height" matches value "456"
  43      And I click on "Save image" "button"
  44      And I click on "Update profile" "button"
  45      And I follow "Edit profile"
  46      And I select the text in the "Description" Atto editor
  47      And I click on "Image" "button"
  48      Then the field "Describe this image for someone who cannot see it" matches value "It's the Moodle"
  49      And the field "Width" matches value "123"
  50      And the field "Height" matches value "456"
  51  
  52    @javascript
  53    Scenario: Manually inserting an image
  54      Given I log in as "admin"
  55      And I follow "Profile" in the user menu
  56      And I follow "Edit profile"
  57      And I set the field "Description" to "<p>Image: <img src='/nothing/here'>.</p>"
  58      And I select the text in the "Description" Atto editor
  59      When I click on "Image" "button"
  60      Then the field "Enter URL" matches value "/nothing/here"
  61      And I set the field "Describe this image for someone who cannot see it" to "Something"
  62      And I set the field "Enter URL" to ""
  63      And I press "Save image"
  64      And I set the field "Description" to "<p>Image: <img src='/nothing/again' width='123' height='456' alt='Awesome!'>.</p>"
  65      And I press "Update profile"
  66      And I follow "Edit profile"
  67      And I select the text in the "Description" Atto editor
  68      And I click on "Image" "button"
  69      And the field "Enter URL" matches value "/nothing/again"
  70      And the field "Width" matches value "123"
  71      And the field "Height" matches value "456"
  72      And the field "Describe this image" matches value "Awesome!"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1