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

ISTWCMS-7189 Add switchToIFrame to make WcmsTestsBlocksTeaserCest work

parent daaaa618
No related branches found
No related tags found
1 merge request!83ISTWCMS-7160 Fix service content type in testAutomaticListBlocksSettings in...
...@@ -111,6 +111,9 @@ class WcmsTestsBlocksTeaserCest { ...@@ -111,6 +111,9 @@ class WcmsTestsBlocksTeaserCest {
$i->click('Content teaser'); $i->click('Content teaser');
$i->waitForText('Configure block'); $i->waitForText('Configure block');
// Switch the block form iframe.
$i->switchToIFrame('iframe[class="lbim-dialog-iframe"]');
// Test the config for the teaser block. // Test the config for the teaser block.
$i->see('Heading level'); $i->see('Heading level');
$i->seeElement('option[value="h2"][selected="selected"]'); $i->seeElement('option[value="h2"][selected="selected"]');
...@@ -176,8 +179,12 @@ class WcmsTestsBlocksTeaserCest { ...@@ -176,8 +179,12 @@ class WcmsTestsBlocksTeaserCest {
$i->click('Content teaser'); $i->click('Content teaser');
$i->waitForText('Configure block'); $i->waitForText('Configure block');
// Switch the block form iframe.
$i->switchToIFrame('iframe[class="lbim-dialog-iframe"]');
// Select the content type.
$i->waitForElement('#edit-settings-content-type');
$i->selectOption('select[name="settings[content_type]"]', $content_type); $i->selectOption('select[name="settings[content_type]"]', $content_type);
$i->waitForText($content_type . ' settings');
// Get the field name to fill in. // Get the field name to fill in.
$field_name = 'input[name="settings[' . $machine_name . '][nid]"]'; $field_name = 'input[name="settings[' . $machine_name . '][nid]"]';
...@@ -199,7 +206,10 @@ class WcmsTestsBlocksTeaserCest { ...@@ -199,7 +206,10 @@ class WcmsTestsBlocksTeaserCest {
); );
// Click on the add block and ensure that it saves. // Click on the add block and ensure that it saves.
$i->click('Add block'); $i->waitForElementClickable('input[id*="edit-actions-submit"]');
$i->click('input[id*="edit-actions-submit"]');
$i->switchToIFrame();
$i->waitForText('Content teaser'); $i->waitForText('Content teaser');
// Ensure that the teaser block is on the page. // Ensure that the teaser block is on the page.
......
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