Skip to content

Commit

Permalink
MNT Behat test for inserting link on image
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Sep 1, 2023
1 parent 80949df commit 71941c7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/behat/features/wysiwyg-image-toolbar.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ Feature: Use the WYSIWYG image toolbar
Then the "Content" HTML field should not contain "file1.jpg"
# Required to avoid "unsaved changes" browser dialog
When I press the "Save" button

Scenario: I can add link to an internal page to an image
Given I fill in the "Content" HTML field with "<p><img src='file1.jpg'/></p>"
When I select the image "file1.jpg" in the "Content" HTML field
And I press the "Insert link" HTML field button
And I click "Page on this site" in the ".tox-collection__group" element
Then I should see an "form#Form_editorInternalLink" element
And I should not see the "#Form_editorInternalLink_Text_Holder" element
When I select "About Us" in the "#Form_editorInternalLink_PageID_Holder" tree dropdown
And I fill in "my desc" for "Link description"
And I press the "Insert link" button
Then the "Content" HTML field should contain "<a title="my desc" href="[file_link,id=2]"><img src="file1.jpg"/></a>"
Then I press the "Save" button

0 comments on commit 71941c7

Please sign in to comment.