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
Checkout
Test
Block
Cart
DiscountCodes.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Checkout\Test\Block\Cart
;
8
9
use Magento\Mtf\Block\Form;
10
use Magento\Mtf\Client\Locator;
11
16
class
DiscountCodes
extends
Form
17
{
23
protected
$formWrapper
=
'.content'
;
24
30
protected
$openForm
=
'.title'
;
31
37
protected
$couponCode
=
'#coupon_code'
;
38
44
protected
$applyButton
=
'.action.apply'
;
45
52
public
function
applyCouponCode
(
$code
)
53
{
54
if
(!$this->_rootElement->find($this->formWrapper)->isVisible()) {
55
$this->_rootElement->find($this->openForm, Locator::SELECTOR_CSS)->click();
56
}
57
$this->_rootElement->find($this->couponCode, Locator::SELECTOR_CSS)->setValue(
$code
);
58
$this->_rootElement->find($this->applyButton, Locator::SELECTOR_CSS)->click();
59
}
60
}
Magento\Checkout\Test\Block\Cart\DiscountCodes\$openForm
$openForm
Definition:
DiscountCodes.php:30
Magento\Checkout\Test\Block\Cart\DiscountCodes\applyCouponCode
applyCouponCode($code)
Definition:
DiscountCodes.php:52
Magento\Checkout\Test\Block\Cart\DiscountCodes
Definition:
DiscountCodes.php:16
Magento\Checkout\Test\Block\Cart\DiscountCodes\$applyButton
$applyButton
Definition:
DiscountCodes.php:44
Magento\Checkout\Test\Block\Cart\DiscountCodes\$couponCode
$couponCode
Definition:
DiscountCodes.php:37
Magento\Checkout\Test\Block\Cart
Definition:
AbstractCartItem.php:7
Magento\Checkout\Test\Block\Cart\DiscountCodes\$formWrapper
$formWrapper
Definition:
DiscountCodes.php:23
$code
$code
Definition:
info.phtml:12