Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Behat test to test special characters in shortcode #1376

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tests/behat/features/insert-an-image.feature
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,36 @@ Feature: Insert an image into a page
# Required to avoid "unsaved changed" browser dialog
And I press the "Save" button

Scenario: I can add text with special characters as Alternative text
When I press the "Insert from Files" HTML field button
And I select the file named "folder1" in the gallery
And I click on the file named "file1" in the gallery
Then I should see the "Form_fileInsertForm" form
When I fill in "Alternative text (alt)" with "My alt updated & saved"
When I fill in "Title text (tooltip)" with "My title text updated & saved"
And I press the "Insert" button
Then the "Content" HTML field should contain "file1.jpg"
And the "Content" HTML field should contain "My alt updated & saved"
And I press the "Save" button
# We need this to update DB with new value after it was created in the previous step
When I press the "Save" button
Then the "Content" HTML field should contain "file1.jpg"
And the "Content" HTML field should contain "My alt updated & saved"
And the "Content" HTML field should contain "My title text updated & saved"
When I select the image "file1.jpg" in the "Content" HTML field
And I press the "Insert from Files" HTML field button
And I should see the "Update file" button
When I fill in "Caption" with "My caption updated & saved"
And I press the "Update file" button
Then the "Content" HTML field should contain "My alt updated & saved"
And the "Content" HTML field should contain "My title text updated & saved"
And the "Content" HTML field should contain "My caption updated & saved"
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
And I press the "Publish" button
Then I go to "/about-us"
And I should see an "img[alt='My alt updated & saved']" element
And I should see an "img[title='My title text updated & saved']" element
And I should see "My caption updated & saved"

Scenario: I can link to a file
Given I select "awesome" in the "Content" HTML field
When I press the "Insert link" HTML field button
Expand Down