diff --git a/acceptance/WcmsTestsBlocksWebformsCest.php b/acceptance/WcmsTestsBlocksWebformsCest.php index 1f818b26020460f04c33c07e154f695dab296a80..92cdc4e665b3549ee868dadaa9bf425bae165abb 100644 --- a/acceptance/WcmsTestsBlocksWebformsCest.php +++ b/acceptance/WcmsTestsBlocksWebformsCest.php @@ -1,6 +1,5 @@ <?php -use Codeception\Util\Locator; use Drupal\webform\Entity\Webform; /** @@ -65,6 +64,9 @@ class WcmsTestsBlocksWebformsCest { $i->click('Webform'); $i->waitForText('Configure block'); + // Switch the block form iframe. + $i->switchToIFrame('iframe[class="lbim-dialog-iframe"]'); + // The settings for the webform block. $title = $i->uwRandomString(); $webform_name = 'Test form (test_form)'; @@ -75,8 +77,11 @@ class WcmsTestsBlocksWebformsCest { // Click on add block and ensure it is on the screen. $i->click('Add block'); - $i->waitForElement(Locator::contains('div[class="uw-admin-label"]', 'Webform')); - $i->seeElement(Locator::contains('div[class="uw-admin-label"]', 'Webform')); + + // Switch to iFrame. + $i->switchtoIFrame(); + $i->waitForText($title); + $i->see($title); // Need to save the layout to continue the tests. $i->waitForElementClickable('#edit-actions #edit-submit'); @@ -84,7 +89,7 @@ class WcmsTestsBlocksWebformsCest { // Ensure elements are on the page. $i->see($title); - $i->click('input[class*="webform-button--submit"][value="Submit"]'); + $i->click('input[id="edit-submit"]'); // Wait for a click the back to form. $i->waitForText('Back to form');