$this->assertFieldByXPath('//input[@value="7000" and @name="settings[block_form][field_uw_slide_speed][0][value]"]',NULL,'Default value is 7000ms.');
// The default value of 'Slide speed' is 7000ms.
$this->assertTrue((bool)$this->xpath('//input[@value="7000" and @name="settings[block_form][field_uw_slide_speed][0][value]"]'),'7000 ms is selected.');
$this->assertSession()->pageTextContains('Enter the time, in milliseconds, that should elapse between slides when the slideshow is playing.');
$this->assertFieldByXPath('//input[@value="400" and @name="settings[block_form][field_uw_transition_speed][0][value]"]',NULL,'Default value is 400ms.');
// The default value of 'Transition speed' is 400ms.
$this->assertTrue((bool)$this->xpath('//input[@value="400" and @name="settings[block_form][field_uw_transition_speed][0][value]"]'),'400 ms is selected.');
$this->assertSession()->pageTextContains('Enter the time, in milliseconds, the banner transition should take to complete.');
// Autoplay is checked by default.
...
...
@@ -178,8 +180,9 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->assertFieldByXPath('//option[@value="full-width" and @selected="selected"]',NULL,'Full banner width, bottom, theme colour background ("FDSU" style) is selected.');
// Full banner width, bottom, theme colour background
// ("FDSU" style) is selected as default.
$this->assertTrue((bool)$this->xpath('//option[@value="full-width" and @selected="selected"]'),'Full banner width, bottom, theme colour background ("FDSU" style) is selected as default.');
$this->assertSession()->pageTextContains('Note that all options other than "FDSU" style are unsupported at this time, and are provided for future use.');
// Click 'Add Image banner'.
...
...
@@ -261,7 +264,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->submitForm($edit,'Save');
// Test for existence Webform CAPTCHA component on newly-created Webform.
$this->assertFieldByXPath('//div[@class="uw-google-maps"]/div[text()="Enable JavaScript to view map."]');
$this->assertFieldByXPath('//div[@class="uw-google-maps"]/iframe[@height="'.$edit['edit-settings-block-form-field-gmaps-height-0-value'].'" and @src="'.$edit['edit-settings-block-form-field-gmaps-embedded-url-0-uri'].'"]');
$this->assertTrue((bool)$this->xpath('//div[@class="uw-google-maps"]/div[text()="Enable JavaScript to view map."]'));
$this->assertTrue((bool)$this->xpath('//div[@class="uw-google-maps"]/iframe[@height="'.$edit['edit-settings-block-form-field-gmaps-height-0-value'].'" and @src="'.$edit['edit-settings-block-form-field-gmaps-embedded-url-0-uri'].'"]'));
break;
case'Multi-type list':
...
...
@@ -1214,7 +1217,7 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Test that the PowerBI block markup appears on the page.
$this->assertFieldByXPath($xpath_prefix.'/a[@href="'.$edit['edit-settings-block-form-field-uw-rl-related-link-1-uri'].'" and text()="'.$edit['edit-settings-block-form-field-uw-rl-related-link-1-title'].'"]');
$this->assertTrue((bool)$this->xpath($xpath_prefix.'/a[@href="'.$edit['edit-settings-block-form-field-uw-rl-related-link-1-uri'].'" and text()="'.$edit['edit-settings-block-form-field-uw-rl-related-link-1-title'].'"]'));
unset($xpath_prefix);
break;
...
...
@@ -1260,11 +1263,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Test that the appropriate Tableau block markup appears on the page.
$this->assertFieldByXPath('//object[@class="tableauViz"]/param[@name="host_url" and @value="https://public.tableau.com/"]');
$this->assertFieldByXPath('//object[@class="tableauViz"]/param[@name="site_root" and @value="'.$edit['edit-settings-block-form-field-uw-tbl-site-name-0-value'].'"]');
$this->assertFieldByXPath('//object[@class="tableauViz"]/param[@name="name" and @value="'.$edit['edit-settings-block-form-field-uw-tbl-tableau-name-0-value'].'"]');
$this->assertFieldByXPath('//object[@class="tableauViz"]/param[@name="tabs" and @value="yes"]');
$this->assertTrue((bool)$this->xpath('//object[@class="tableauViz"]/param[@name="host_url" and @value="https://public.tableau.com/"]'));
$this->assertTrue((bool)$this->xpath('//object[@class="tableauViz"]/param[@name="site_root" and @value="'.$edit['edit-settings-block-form-field-uw-tbl-site-name-0-value'].'"]'));
$this->assertTrue((bool)$this->xpath('//object[@class="tableauViz"]/param[@name="name" and @value="'.$edit['edit-settings-block-form-field-uw-tbl-tableau-name-0-value'].'"]'));
$this->assertTrue((bool)$this->xpath('//object[@class="tableauViz"]/param[@name="tabs" and @value="yes"]'));