File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed
app/code/Magento/Checkout/Controller/Cart
dev/tests/functional/tests/app/Magento/Checkout/Test Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ public function execute()
68
68
->setRegion ($ region )
69
69
->setCollectShippingRates (true );
70
70
$ this ->quoteRepository ->save ($ this ->cart ->getQuote ());
71
+ $ this ->cart ->save ();
71
72
return $ this ->_goBack ();
72
73
}
73
74
}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public function execute()
16
16
$ code = (string )$ this ->getRequest ()->getParam ('estimate_method ' );
17
17
if (!empty ($ code )) {
18
18
$ this ->cart ->getQuote ()->getShippingAddress ()->setShippingMethod ($ code )->save ();
19
+ $ this ->cart ->save ();
19
20
}
20
21
return $ this ->_goBack ();
21
22
}
Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ class Cart extends Block
57
57
*/
58
58
protected $ cartEmpty = '.cart-empty ' ;
59
59
60
+ /**
61
+ * Cart container selector
62
+ *
63
+ * @var string
64
+ */
65
+ protected $ cartContainer = '.cart-container ' ;
66
+
60
67
/**
61
68
* Get cart item block
62
69
*
@@ -170,4 +177,12 @@ public function cartIsEmpty()
170
177
{
171
178
return $ this ->_rootElement ->find ($ this ->cartEmpty , Locator::SELECTOR_CSS )->isVisible ();
172
179
}
180
+
181
+ /**
182
+ * Wait while cart container is loaded
183
+ */
184
+ public function waitCartContainerLoading ()
185
+ {
186
+ $ this ->waitForElementVisible ($ this ->cartContainer );
187
+ }
173
188
}
Original file line number Diff line number Diff line change @@ -106,7 +106,9 @@ public function __construct(
106
106
public function run ()
107
107
{
108
108
$ this ->checkoutCart ->open ();
109
+ $ this ->checkoutCart ->getCartBlock ()->waitCartContainerLoading ();
109
110
$ this ->checkoutCart ->getShippingBlock ()->fillEstimateShippingAndTax ($ this ->address );
111
+ $ this ->checkoutCart ->getCartBlock ()->waitCartContainerLoading ();
110
112
if ($ this ->shipping ['shipping_service ' ] !== '- ' ) {
111
113
$ this ->checkoutCart ->getShippingBlock ()->selectShippingMethod ($ this ->shipping );
112
114
}
You can’t perform that action at this time.
0 commit comments