Skip to content

Commit 7c6f1cd

Browse files
committed
MAGETWO-64297: No websites shown in grid
1 parent 3238dbd commit 7c6f1cd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertDiscountInShoppingCart.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use Magento\Checkout\Test\Fixture\Cart;
1010
use Magento\Checkout\Test\Page\CheckoutCart;
11+
use Magento\Customer\Test\Fixture\Customer;
1112
use Magento\Mtf\Constraint\AbstractConstraint;
1213

1314
/**
@@ -20,19 +21,29 @@ class AssertDiscountInShoppingCart extends AbstractConstraint
2021
/**
2122
* Assert that discount is equal to expected.
2223
*
24+
* @param Customer $customer
2325
* @param CheckoutCart $checkoutCart
2426
* @param Cart $cart
2527
* @return void
2628
*/
27-
public function processAssert(CheckoutCart $checkoutCart, Cart $cart)
28-
{
29+
public function processAssert(
30+
Customer $customer,
31+
CheckoutCart $checkoutCart,
32+
Cart $cart
33+
) {
34+
$loginStep = $this->objectManager->create(
35+
\Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
36+
['customer' => $customer]
37+
);
38+
$loginStep->run();
2939
$checkoutCart->open();
3040
$checkoutCart->getTotalsBlock()->waitForUpdatedTotals();
3141
\PHPUnit_Framework_Assert::assertEquals(
3242
number_format($cart->getDiscount(), 2),
3343
$checkoutCart->getTotalsBlock()->getDiscount(),
3444
'Discount amount in the shopping cart not equals to discount amount from fixture.'
3545
);
46+
$loginStep->cleanUp();
3647
}
3748

3849
/**

0 commit comments

Comments
 (0)