From 47e336b0c7c935c0a08543ccce5f8ece4284e49a Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Tue, 8 Aug 2023 10:21:46 +1200 Subject: [PATCH] MNT Behat test to test special characters in shortcode --- tests/behat/features/insert-an-image.feature | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/behat/features/insert-an-image.feature b/tests/behat/features/insert-an-image.feature index 3c2868346..daf4a0b44 100644 --- a/tests/behat/features/insert-an-image.feature +++ b/tests/behat/features/insert-an-image.feature @@ -105,6 +105,33 @@ 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" + Then 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" + Then I go to "/about-us" + And I should see "My alt updated & saved" in the "img" element + And I should see "My title text updated & saved" in the "img" element + Then I go to "/admin/pages" + 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