mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Behat: Ignore native dropdowns if they're not visible
The CmsUiContext->theIFillInTheDropdownWith() method was written primarily for TreeDropdownField, which don't have a select tag (only an input tag). The method currently fails for CMS dropdowns (Dropdown form field class), since they have a hidden select tag. I've checked through core feature files and confirmed that every use of the method relates to TreeDropdownField, which is why this bug hasn't ocurred earlier.
This commit is contained in:
parent
fb8fda0058
commit
c705c547fd
@ -418,7 +418,7 @@ class CmsUiContext extends BehatContext {
|
||||
'named',
|
||||
array('select', $this->getSession()->getSelectorsHandler()->xpathLiteral($field))
|
||||
);
|
||||
if($nativeField) {
|
||||
if($nativeField && $nativeField->isVisible()) {
|
||||
$nativeField->selectOption($value);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user