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
SalesRule
Test
Block
Adminhtml
Promo
Quote
Edit
Section
ManageCouponCode.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section
;
7
8
use Magento\Mtf\Client\Locator;
9
use
Magento\Ui\Test\Block\Adminhtml\Section
;
10
14
class
ManageCouponCode
extends
Section
15
{
16
const
GENERATE_CODES_BUTTON_CSS_SELECTOR
=
".action-default.scalable.generate"
;
17
18
const
LAST_GENERATED_COUPON_CODE_SELECTOR
=
"//*[@id=\"couponCodesGrid_table\"]/tbody/tr/td[2]"
;
19
20
const
SPINNER
=
".loading-mask"
;
21
27
public
function
generateCouponCodes
()
28
{
29
$button = $this->_rootElement->find(self::GENERATE_CODES_BUTTON_CSS_SELECTOR);
30
$button->click();
31
}
32
38
public
function
getGeneratedCouponCode
()
39
{
40
$this->waitForSpinner();
41
$column = $this->_rootElement->find(self::LAST_GENERATED_COUPON_CODE_SELECTOR, Locator::SELECTOR_XPATH);
42
return
$column->getText();
43
}
44
45
private
function
waitForSpinner()
46
{
47
$this->waitForElementNotVisible(self::SPINNER);
48
sleep(1);
49
}
50
}
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section\ManageCouponCode\LAST_GENERATED_COUPON_CODE_SELECTOR
const LAST_GENERATED_COUPON_CODE_SELECTOR
Definition:
ManageCouponCode.php:18
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section\ManageCouponCode\SPINNER
const SPINNER
Definition:
ManageCouponCode.php:20
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section
Definition:
Conditions.php:6
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section\ManageCouponCode
Definition:
ManageCouponCode.php:14
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section\ManageCouponCode\GENERATE_CODES_BUTTON_CSS_SELECTOR
const GENERATE_CODES_BUTTON_CSS_SELECTOR
Definition:
ManageCouponCode.php:16
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section\ManageCouponCode\generateCouponCodes
generateCouponCodes()
Definition:
ManageCouponCode.php:27
Magento\SalesRule\Test\Block\Adminhtml\Promo\Quote\Edit\Section\ManageCouponCode\getGeneratedCouponCode
getGeneratedCouponCode()
Definition:
ManageCouponCode.php:38
Magento\Ui\Test\Block\Adminhtml\Section
Definition:
Section.php:14