mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Use more solid getValue() in Behat assertions
getAttribute('value') behaves inconsistently with Selenium drivers (fails on Travis and TeamCity, but works locally). Selenium2Driver in Mink provides a JS wrapper for getting the value, which is more reliable. This fixes "insert a link" failures, see https://travis-ci.org/silverstripe/silverstripe-cms/jobs/14281251
This commit is contained in:
parent
fd41112d15
commit
df2d59df1c
@ -92,7 +92,7 @@ class CmsFormsContext extends BehatContext {
|
||||
$element = $page->findField($locator);
|
||||
assertNotNull($element, sprintf('HTML field "%s" not found', $locator));
|
||||
|
||||
$actual = $element->getAttribute('value');
|
||||
$actual = $element->getValue();
|
||||
$regex = '/'.preg_quote($html, '/').'/ui';
|
||||
if (!preg_match($regex, $actual)) {
|
||||
$message = sprintf(
|
||||
|
Loading…
Reference in New Issue
Block a user