mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
7dfe5ccbd2
commit
924664527b
@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user