From ce7ca1c6cfeef33ed189ad910db2e053672f443a Mon Sep 17 00:00:00 2001 From: Stephan Robotta Date: Mon, 9 Oct 2023 16:16:38 +0200 Subject: [PATCH] Fix behat test "remove all languages" to work with >=4.3 Prior to 4.3 the source code view in the tinyMCE just containted the text area with the html. From 4.3 onwards the source view contains syntax highlighting therefore a xpath for the content doesn't work as expected. --- tests/behat/tiny_multilang.feature | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/behat/tiny_multilang.feature b/tests/behat/tiny_multilang.feature index 2002108..76b037d 100644 --- a/tests/behat/tiny_multilang.feature +++ b/tests/behat/tiny_multilang.feature @@ -71,9 +71,15 @@ Feature: Tiny editor multilang plugin with multilangfilter2 And I click on the "Format > Language > English (en)" submenu item for the "Description" TinyMCE editor And I select the inner "p" element in position "1" of the "Description" TinyMCE editor And I click on the "Format > Language > Deutsch (de)" submenu item for the "Description" TinyMCE editor - When I click on the "Format > Language > Remove all lang tags" submenu item for the "Description" TinyMCE editor - And I click on the "View > Source code" submenu item for the "Description" TinyMCE editor - Then "//textarea[@class='tox-textarea'][contains(@data-initial-value, '

Some plain text

')][contains(@data-initial-value, '

Ein anderer Text

')]" "xpath_element" should exist + And I press "Update profile" + Then "//p[contains(text(), '{mlang en}Some plain text{mlang}')]" "xpath_element" should exist + And "//p[contains(text(), '{mlang de}Ein anderer Text{mlang}')]" "xpath_element" should exist + When I click on "Edit profile" "link" + And I wait until the page is ready + And I click on the "Format > Language > Remove all lang tags" submenu item for the "Description" TinyMCE editor + And I press "Update profile" + Then "//p[contains(text(), 'Some plain text')]" "xpath_element" should exist + And "//p[contains(text(), 'Ein anderer Text')]" "xpath_element" should exist Scenario: Test language direction. Given the following config values are set as admin: