diff --git a/acceptance/WcmsTestsBlocksEmbedsCest.php b/acceptance/WcmsTestsBlocksEmbedsCest.php index 88db3284018cf409b9ca58d6e327e9f2eb54e61a..187f3140184253ed6946324ef8506f5d7d2a3119 100644 --- a/acceptance/WcmsTestsBlocksEmbedsCest.php +++ b/acceptance/WcmsTestsBlocksEmbedsCest.php @@ -1,7 +1,5 @@ <?php -use Codeception\Util\Locator; - /** * Class WcmsTestsBlocksEmbedsCest. * @@ -55,6 +53,9 @@ class WcmsTestsBlocksEmbedsCest { $i->click('Google Maps'); $i->waitForText('Configure block'); + // Switch the block form iframe. + $i->switchToIFrame('iframe[class="lbim-dialog-iframe"]'); + // Get the settings for Google Maps. $title = $i->uwRandomString(); $gm_url = 'https://www.google.com/maps/embed?pb=' . $i->uwRandomString(); @@ -67,8 +68,10 @@ class WcmsTestsBlocksEmbedsCest { // Click on add block and ensure it is on the screen. $i->click('Add block'); - $i->waitForElement(Locator::contains('div[class="uw-admin-label"]', 'Google Maps')); - $i->seeElement(Locator::contains('div[class="uw-admin-label"]', 'Google Maps')); + + $i->switchtoIFrame(); + $i->waitForElement('div[class="uw-google-maps"]'); + $i->seeElement('div[class="uw-google-maps"]'); // Check for elements on the page. $i->see($title); @@ -108,6 +111,9 @@ class WcmsTestsBlocksEmbedsCest { $i->click('PowerBI'); $i->waitForText('Configure block'); + // Switch the block form iframe. + $i->switchToIFrame('iframe[class="lbim-dialog-iframe"]'); + // Get the settings for the block. $title = $i->uwRandomString(); $url = 'https://app.powerbi.com/' . $i->uwRandomString(); @@ -118,8 +124,10 @@ class WcmsTestsBlocksEmbedsCest { // Click on add block and ensure it is on the screen. $i->click('Add block'); - $i->waitForElement(Locator::contains('div[class="uw-admin-label"]', 'PowerBI')); - $i->seeElement(Locator::contains('div[class="uw-admin-label"]', 'PowerBI')); + + $i->switchToIFrame(); + $i->waitForElement('div[class="uw-powerbi"]'); + $i->seeElement('div[class="uw-powerbi"]'); // Ensure elements are on the page. $i->see($title); @@ -159,6 +167,9 @@ class WcmsTestsBlocksEmbedsCest { $i->click('Social Intents'); $i->waitForText('Configure block'); + // Switch the block form iframe. + $i->switchToIFrame('iframe[class="lbim-dialog-iframe"]'); + // Get the settings we are going to use. $title = $i->uwRandomString(); $username = 'uwist'; @@ -169,8 +180,10 @@ class WcmsTestsBlocksEmbedsCest { // Click on add block and ensure it is on the screen. $i->click('Add block'); - $i->waitForElement(Locator::contains('div[class="uw-admin-label"]', 'Social Intents')); - $i->seeElement(Locator::contains('div[class="uw-admin-label"]', 'Social Intents')); + + $i->switchToIFrame(); + $i->waitForElement('div[class="uw-social-intents"]'); + $i->seeElement('div[class="uw-social-intents"]'); // Ensure elements appear on the page. $i->see($title); @@ -209,6 +222,9 @@ class WcmsTestsBlocksEmbedsCest { $i->click('Tableau visualization'); $i->waitForText('Configure block'); + // Switch the block form iframe. + $i->switchToIFrame('iframe[class="lbim-dialog-iframe"]'); + // Get the settings we are going to use. $title = $i->uwRandomString(); $height = rand(100, 1000); @@ -225,8 +241,10 @@ class WcmsTestsBlocksEmbedsCest { // Click on add block and ensure it is on the screen. $i->click('Add block'); - $i->waitForElement(Locator::contains('div[class="uw-admin-label"]', 'Tableau visualization')); - $i->seeElement(Locator::contains('div[class="uw-admin-label"]', 'Tableau visualization')); + + $i->switchToIFrame(); + $i->waitForElement('div[class="uw-tableau"]'); + $i->seeElement('div[class="uw-tableau"]'); // Ensure elements appear on the page. $i->see($title);