/** * {@inheritdoc} */ public function findField($name) { $field = parent::findField($name); if (!$field) { $field = $this->getElement('Attribute options table')->find('css', sprintf('th:contains("%s")', $name)); } return $field; }
/** * {@inheritdoc} * * @throws TimeoutException */ public function fillField($locator, $value, Element $modal = null) { $selectContainer = $this->spin(function () use($modal) { return $modal->find('css', '.select2-container'); }); $placeholder = $selectContainer->find('css', sprintf('.select2-chosen:contains("%s")', $locator)); if ($placeholder) { $this->fillSelect2Field($selectContainer, $value); } else { parent::fillField($locator, $value, $modal); } }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Category tree' => ['css' => '#tree', 'decorators' => ['Pim\\Behat\\Decorator\\Tree\\JsTreeDecorator']], 'Tree select' => ['css' => '#tree_select'], 'Right click menu' => ['css' => '#vakata-contextmenu']]); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Export now button' => ['css' => '.navbar-buttons .export-btn']]); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Save' => ['css' => '.ui-dialog-buttonset .btn-primary']]); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = array()) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, array('Locales dropdown' => array('css' => '#locale-switcher'), 'Locales selector' => array('css' => '#pim_product_locales'), 'Enable switcher' => array('css' => '#switch_status'), 'Image preview' => array('css' => '#lbImage'), 'Completeness' => array('css' => '#pim_enrich-product-tab-completeness'), 'Category pane' => array('css' => '#pim_enrich-product-tab-category'), 'Category tree' => array('css' => '#trees'), 'Comparison dropdown' => array('css' => '#comparison-switcher'), 'Copy selection dropdown' => array('css' => '#copy-selection-switcher'), 'Copy translations link' => array('css' => 'a#copy-selection'), 'Comment threads' => array('css' => '#comment_threads'))); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge(['Locale field' => ['css' => 'pim_user_user_form[uiLocale]']], $this->elements); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Attributes' => ['css' => '.tab-pane.tab-attribute table'], 'Attribute as label choices' => ['css' => '#pim_enrich_family_form_attributeAsLabel']]); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge(['Category tree' => ['css' => '.jstree', 'decorators' => ['Pim\\Behat\\Decorator\\Tree\\JsTreeDecorator']], 'Available attributes' => ['css' => '.add-attribute', 'decorators' => ['Pim\\Behat\\Decorator\\Common\\AddAttributeDecorator']], 'Attribute selector' => ['css' => '.control-group.attributes', 'decorators' => ['Pim\\Behat\\Decorator\\Export\\Structure\\AttributesDecorator']]], $this->elements); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Main context selector' => ['css' => '.tab-container .object-attributes .attribute-edit-actions'], 'Save' => ['css' => 'button.save']]); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Main context selector' => ['css' => '#attribute-buttons', 'decorators' => ['Pim\\Behat\\Decorator\\ContextSwitcherDecorator']]]); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge(['Locale field' => ['css' => 'system-locale']], $this->elements); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = array()) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, array('Attributes' => array('css' => '#attributes table'), 'Attribute as label choices' => array('css' => '#pim_enrich_family_form_attributeAsLabel'))); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge(['Permission' => ['css' => '#rights-action', 'decorators' => ['Pim\\Behat\\Decorator\\Permission\\PermissionDecorator']]], $this->elements); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = array()) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, array('Attributes' => array('css' => '.tab-pane.tab-attribute table'))); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = array()) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, array('Roles' => array('css' => '#oro_user_user_form_rolesCollection'))); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = array()) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, array('Category tree' => array('css' => '#tree'), 'Tree select' => array('css' => '#tree_select'), 'Right click menu' => array('css' => '#vakata-contextmenu'))); }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge($this->elements, ['Locales dropdown' => ['css' => '#locale-switcher']]); }
/** * Guesses the type of field identified by $label and returns it. * * Possible identified fields are : * [date, metric, multiSelect, number, price, select, text, textArea] * * @param $fieldContainer * * @return string */ protected function getFieldType($fieldContainer, $isLabel = false) { if (null === $fieldContainer || !$fieldContainer instanceof NodeElement) { return null; } if ($isLabel) { $formFieldWrapper = $fieldContainer->getParent()->getParent(); } else { $formFieldWrapper = $fieldContainer->find('css', 'div.form-field'); } if ($formFieldWrapper->hasClass('akeneo-datepicker-field')) { return 'date'; } elseif ($formFieldWrapper->hasClass('akeneo-metric-field')) { return 'metric'; } elseif ($formFieldWrapper->hasClass('akeneo-multi-select-field') || $formFieldWrapper->hasClass('akeneo-multi-select-reference-data-field')) { return 'multiSelect'; } elseif ($formFieldWrapper->hasClass('akeneo-number-field')) { return 'number'; } elseif ($formFieldWrapper->hasClass('akeneo-price-collection-field')) { return 'price'; } elseif ($formFieldWrapper->hasClass('akeneo-simple-select-field') || $formFieldWrapper->hasClass('akeneo-simple-select-reference-data-field')) { return 'select'; } elseif ($formFieldWrapper->hasClass('akeneo-text-field')) { return 'text'; } elseif ($formFieldWrapper->hasClass('akeneo-textarea-field') || $formFieldWrapper->hasClass('akeneo-wysiwyg-field')) { return 'textArea'; } elseif ($formFieldWrapper->hasClass('akeneo-media-uploader-field')) { return 'media'; } elseif ($formFieldWrapper->hasClass('akeneo-switch-field')) { return 'switch'; } else { return parent::getFieldType($fieldContainer); } }
/** * {@inheritdoc} */ public function __construct($session, $pageFactory, $parameters = []) { parent::__construct($session, $pageFactory, $parameters); $this->elements = array_merge(['ACL Group' => ['css' => '#rights-action ul li'], 'ACL Role' => ['css' => '#rights-action .acl-permission']], $this->elements); }