Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
functional
tests
app
Magento
Widget
Test
Block
Adminhtml
WidgetForm.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Widget\Test\Block\Adminhtml
;
8
9
use Magento\Mtf\Block\Form;
10
use Magento\Mtf\Client\Locator;
11
15
class
WidgetForm
extends
Form
16
{
22
protected
$widgetType
=
'[name="widget_type"]'
;
23
29
protected
$insertButton
=
'#insert_button'
;
30
36
protected
$loaderOld
=
'//ancestor::body/div[@id="loading-mask"]'
;
37
44
public
function
addWidget
($widget)
45
{
46
$this->
selectWidgetType
($widget[
'widget_type'
]);
47
$mapping = $this->dataMapping($widget);
48
$this->_fill($mapping);
49
$this->
insertWidget
();
50
}
51
58
protected
function
selectWidgetType
(
$type
)
59
{
60
$this->_rootElement->find($this->widgetType, Locator::SELECTOR_CSS,
'select'
)->setValue(
$type
);
61
$this->waitForElementNotVisible($this->loaderOld, Locator::SELECTOR_XPATH);
62
}
63
69
protected
function
insertWidget
()
70
{
71
$this->_rootElement->find($this->insertButton)->click();
72
$this->waitForElementNotVisible($this->loaderOld, Locator::SELECTOR_XPATH);
73
}
74
}
Magento\Widget\Test\Block\Adminhtml
Magento\Widget\Test\Block\Adminhtml\WidgetForm\$insertButton
$insertButton
Definition:
WidgetForm.php:29
Magento\Widget\Test\Block\Adminhtml\WidgetForm\selectWidgetType
selectWidgetType($type)
Definition:
WidgetForm.php:58
$type
$type
Definition:
item.phtml:13
Magento\Widget\Test\Block\Adminhtml\WidgetForm\$loaderOld
$loaderOld
Definition:
WidgetForm.php:36
Magento\Widget\Test\Block\Adminhtml\WidgetForm\insertWidget
insertWidget()
Definition:
WidgetForm.php:69
Magento\Widget\Test\Block\Adminhtml\WidgetForm
Definition:
WidgetForm.php:15
Magento\Widget\Test\Block\Adminhtml\WidgetForm\$widgetType
$widgetType
Definition:
WidgetForm.php:22
Magento\Widget\Test\Block\Adminhtml\WidgetForm\addWidget
addWidget($widget)
Definition:
WidgetForm.php:44