Skip to content

Commit 35b64de

Browse files
committed
MAGETWO-64676: Functional tests changes.
1 parent 22c402d commit 35b64de

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Review.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,29 @@
66

77
namespace Magento\Checkout\Test\Block\Onepage;
88

9-
use Magento\Checkout\Test\Block\Onepage\AbstractReview;
9+
use Magento\Mtf\Client\Locator;
1010

1111
/**
1212
* One page checkout status review block.
1313
*/
1414
class Review extends AbstractReview
1515
{
16-
//
16+
/**
17+
* Review gift card line locator.
18+
*
19+
* @var string
20+
*/
21+
private $giftCardTotalSelector = '//div[contains(@class, "opc-block-summary")]//tr[contains(@class, "giftcard")]';
22+
23+
/**
24+
* Return if gift card is applied.
25+
*
26+
* @return bool
27+
*/
28+
public function isGiftCardApplied()
29+
{
30+
$this->waitForElementNotVisible($this->waitElement);
31+
32+
return $this->_rootElement->find($this->giftCardTotalSelector, Locator::SELECTOR_XPATH)->isVisible();
33+
}
1734
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Checkout\Test\TestStep;
8+
9+
use Magento\Checkout\Test\Page\CheckoutCart;
10+
use Magento\Mtf\TestStep\TestStepInterface;
11+
12+
/**
13+
* Proceed to checkout cart page.
14+
*/
15+
class ViewAndEditCartStep implements TestStepInterface
16+
{
17+
/**
18+
* Checkout cart page.
19+
*
20+
* @var CheckoutCart
21+
*/
22+
protected $checkoutCart;
23+
24+
/**
25+
* @param CheckoutCart $checkoutCart
26+
*/
27+
public function __construct(CheckoutCart $checkoutCart)
28+
{
29+
$this->checkoutCart = $checkoutCart;
30+
}
31+
32+
/**
33+
* Proceed to checkout cart page.
34+
*
35+
* @return void
36+
*/
37+
public function run()
38+
{
39+
$this->checkoutCart->open();
40+
}
41+
}

0 commit comments

Comments
 (0)