File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
dev/tests/functional/tests/app/Magento/Checkout/Test Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ class Totals extends Block
105
105
*/
106
106
public function getGrandTotal ()
107
107
{
108
+ $ this ->waitForUpdatedTotals ();
108
109
$ grandTotal = $ this ->_rootElement ->find ($ this ->grandTotal , Locator::SELECTOR_CSS )->getText ();
109
110
return $ this ->escapeCurrency ($ grandTotal );
110
111
}
Original file line number Diff line number Diff line change 8
8
9
9
use Magento \Checkout \Test \Fixture \Cart ;
10
10
use Magento \Checkout \Test \Page \CheckoutCart ;
11
+ use Magento \Customer \Test \Fixture \Customer ;
11
12
use Magento \Mtf \Constraint \AbstractConstraint ;
12
13
13
14
/**
@@ -20,19 +21,29 @@ class AssertDiscountInShoppingCart extends AbstractConstraint
20
21
/**
21
22
* Assert that discount is equal to expected.
22
23
*
24
+ * @param Customer $customer
23
25
* @param CheckoutCart $checkoutCart
24
26
* @param Cart $cart
25
27
* @return void
26
28
*/
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 ();
29
39
$ checkoutCart ->open ();
30
40
$ checkoutCart ->getTotalsBlock ()->waitForUpdatedTotals ();
31
41
\PHPUnit_Framework_Assert::assertEquals (
32
42
number_format ($ cart ->getDiscount (), 2 ),
33
43
$ checkoutCart ->getTotalsBlock ()->getDiscount (),
34
44
'Discount amount in the shopping cart not equals to discount amount from fixture. '
35
45
);
46
+ $ loginStep ->cleanUp ();
36
47
}
37
48
38
49
/**
You can’t perform that action at this time.
0 commit comments