mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Don't rely on Behat/Selenium returning 'value' for textarea
Technically a textarea DOM node doesn't have a 'value' attribute, but rather a HTML content. This used to work, but likely broke either by updated browser handling or updated selenium logic. Fixes "Scenario: I can edit title and content and see the changes on draft"
This commit is contained in:
parent
556090ccfa
commit
8245125349
@ -92,7 +92,7 @@ class CmsFormsContext extends BehatContext {
|
|||||||
$element = $page->findField($locator);
|
$element = $page->findField($locator);
|
||||||
assertNotNull($element, sprintf('HTML field "%s" not found', $locator));
|
assertNotNull($element, sprintf('HTML field "%s" not found', $locator));
|
||||||
|
|
||||||
$actual = $element->getAttribute('value');
|
$actual = $element->getHTML();
|
||||||
$regex = '/'.preg_quote($html, '/').'/ui';
|
$regex = '/'.preg_quote($html, '/').'/ui';
|
||||||
if (!preg_match($regex, $actual)) {
|
if (!preg_match($regex, $actual)) {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
|
Loading…
Reference in New Issue
Block a user