10 use Magento\Mtf\Client\Locator;
11 use Magento\Mtf\Client\Element\SimpleElement;
26 protected $addNewRow =
'[data-index="link"] [data-action="add_new_row"]';
52 return $this->blockFactory->create(
53 'Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Section\Downloadable\\' .
$type,
54 [
'element' =>
$element->find(sprintf($this->downloadableBlock, strtolower(
$type)), Locator::SELECTOR_CSS)]
69 if (isset(
$fields[
'downloadable_sample'][
'value'])) {
71 $fields[
'downloadable_sample'][
'value']
74 if (isset(
$fields[
'downloadable_links'][
'value'])) {
76 $fields[
'downloadable_links'][
'value']
92 $context =
$element ?: $this->_rootElement;
93 $isDownloadable = $context->find($this->isDownloadableProduct);
94 if ($isDownloadable->isVisible() && $isDownloadable->getAttribute(
'value') !=
'1') {
95 $isDownloadable->click();
97 if (isset(
$fields[
'downloadable_sample'][
'value'])) {
101 if (isset(
$fields[
'downloadable_links'][
'value'])) {
117 $context =
$element ?: $this->_rootElement;
118 $isDownloadable = $context->find($this->isDownloadableProduct);
119 $value =
'Yes' == $downloadable ?
'1' :
'0';
120 if ($isDownloadable->isVisible() && $isDownloadable->getAttribute(
'value') !=
$value) {
121 $isDownloadable->click();
getFieldsData($fields=null, SimpleElement $element=null)
setFieldsData(array $fields, SimpleElement $element=null)
getDownloadableBlock($type, SimpleElement $element=null)
setIsDownloadable(string $downloadable='Yes', SimpleElement $element=null)