diff --git a/acceptance/WcmsTestsCkeditorButtonsCest.php b/acceptance/WcmsTestsCkeditorButtonsCest.php index 494dc05a513a60d5c7ec3ea17edc41df87b46d0e..75a3f59cb2c56fbb44eb4708261c09dda7ac37f7 100644 --- a/acceptance/WcmsTestsCkeditorButtonsCest.php +++ b/acceptance/WcmsTestsCkeditorButtonsCest.php @@ -116,6 +116,9 @@ class WcmsTestsCkeditorButtonsCest { $i->click('Copy text'); $i->waitForText('Configure block'); + // Switch the block form iframe. + $i->switchToIFrame('iframe[class="lbim-dialog-iframe"]'); + // Adds tags to text and xpath selector. $tagged_text = '<span dir="ltr" lang="' . $code . '">' . $language . '</span>'; @@ -126,8 +129,13 @@ class WcmsTestsCkeditorButtonsCest { $i->click('Source'); $i->fillCkEditor($tagged_text, 'textarea[name="settings[block_form][field_uw_copy_text][0][value]"]'); - // Submit form. + // Trigger CKEditor update. + $i->executeJS('for (instance in CKEDITOR.instances) { CKEDITOR.instances[instance].updateElement(); }'); + + // Click the submit button. + $i->waitForElementClickable('input[id*="edit-actions-submit"]'); $i->click('input[id*="edit-actions-submit"]'); + $i->switchToIFrame(); // Ensure that the tag is on the page. $i->waitForElement(Locator::contains('span[lang="' . $code . '"]', $language));