Less assumptions in "HTML field contains" step

Not using the loose idea of a "field name" in the NamedSelector
sense of the word as "field with id exists".
This commit is contained in:
Ingo Schommer 2013-06-07 15:46:05 +02:00
parent 7dfe5ccbd2
commit 924664527b

View File

@ -96,7 +96,11 @@ class CmsFormsContext extends BehatContext
$inputField = $page->findField($field);
assertNotNull($inputField, sprintf('HTML field "%s" not found', $field));
$this->getMainContext()->assertElementContains('#' . $inputField->getAttribute('id'), $value);
$this->getMainContext()->assertSession()->elementContains(
'named',
$field,
str_replace('\\"', '"', $value) // emulates fixStepArgument()
);
}
/**