Skip to content
Snippets Groups Projects
Commit 5848c4b1 authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-7189 Add switchToIFrame to make WcmsTestsCkeditorButtonsCest work

parent 4b67b38c
No related branches found
No related tags found
1 merge request!83ISTWCMS-7160 Fix service content type in testAutomaticListBlocksSettings in...
...@@ -116,6 +116,9 @@ class WcmsTestsCkeditorButtonsCest { ...@@ -116,6 +116,9 @@ class WcmsTestsCkeditorButtonsCest {
$i->click('Copy text'); $i->click('Copy text');
$i->waitForText('Configure block'); $i->waitForText('Configure block');
// Switch the block form iframe.
$i->switchToIFrame('iframe[class="lbim-dialog-iframe"]');
// Adds tags to text and xpath selector. // Adds tags to text and xpath selector.
$tagged_text = '<span dir="ltr" lang="' . $code . '">' . $language . '</span>'; $tagged_text = '<span dir="ltr" lang="' . $code . '">' . $language . '</span>';
...@@ -126,8 +129,13 @@ class WcmsTestsCkeditorButtonsCest { ...@@ -126,8 +129,13 @@ class WcmsTestsCkeditorButtonsCest {
$i->click('Source'); $i->click('Source');
$i->fillCkEditor($tagged_text, 'textarea[name="settings[block_form][field_uw_copy_text][0][value]"]'); $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->click('input[id*="edit-actions-submit"]');
$i->switchToIFrame();
// Ensure that the tag is on the page. // Ensure that the tag is on the page.
$i->waitForElement(Locator::contains('span[lang="' . $code . '"]', $language)); $i->waitForElement(Locator::contains('span[lang="' . $code . '"]', $language));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment