Skip to content

Commit 64a3ee3

Browse files
nmalevanecKajal Solanki
authored andcommitted
Fix functional test.
1 parent a8c0faf commit 64a3ee3

File tree

1 file changed

+17
-0
lines changed
  • dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section

1 file changed

+17
-0
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/Options.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,4 +402,21 @@ public function getFileOptionElements()
402402
{
403403
return $this->_rootElement->getElements($this->hintMessage);
404404
}
405+
406+
/**
407+
* @inheritdoc
408+
*/
409+
protected function _fill(array $fields, SimpleElement $element = null)
410+
{
411+
$context = ($element === null) ? $this->_rootElement : $element;
412+
foreach ($fields as $name => $field) {
413+
$element = $this->getElement($context, $field);
414+
if (!$element->isDisabled()) {
415+
$element->getContext()->hover();
416+
$element->setValue($field['value']);
417+
} else {
418+
throw new \Exception("Unable to set value to field '$name' as it's disabled.");
419+
}
420+
}
421+
}
405422
}

0 commit comments

Comments
 (0)