Skip to content

Commit 0dee51c

Browse files
author
Mariana Lashch
committed
Merge branch 'MAGETWO-96812' into port-1212
2 parents 67232d4 + 6a0ac83 commit 0dee51c

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
2222
</actionGroup>
2323

24+
<!-- Go to checkout from cart -->
25+
<actionGroup name="GoToCheckoutFromCartActionGroup">
26+
<waitForElementNotVisible selector="{{StorefrontMinicartSection.emptyCart}}" stepKey="waitUpdateQuantity" />
27+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
28+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
29+
<seeInCurrentUrl url="{{CheckoutCartPage.url}}" stepKey="assertCheckoutCartUrl"/>
30+
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout"/>
31+
</actionGroup>
32+
2433
<!-- Guest checkout filling shipping section -->
2534
<actionGroup name="GuestCheckoutFillingShippingSectionActionGroup">
2635
<arguments>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
3030
<deleteData createDataKey="simpleproduct1" stepKey="deleteProduct1"/>
3131
<deleteData createDataKey="simplecategory" stepKey="deleteCategory"/>
32-
<deleteData createDataKey="simpleuscustomer" stepKey="deleteCustomer"/>
3332
</after>
3433

3534
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,25 @@
6969
<see selector="{{AdminOrderDetailsInformationSection.shippingAddress}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeAdminOrderShippingAddress"/>
7070
<see selector="{{AdminOrderDetailsInformationSection.itemsOrdered}}" userInput="$$createProduct.name$$" stepKey="seeAdminOrderProduct"/>
7171
</test>
72+
<test name="StorefrontGuestCheckoutWithSidebarDisabledTest" extends="StorefrontGuestCheckoutTest">
73+
<annotations>
74+
<features value="Checkout"/>
75+
<stories value="Checkout via Guest Checkout"/>
76+
<title value="Guest Checkout when Cart sidebar disabled"/>
77+
<description value="Should be able to place an order as a Guest when Cart sidebar is disabled"/>
78+
<severity value="CRITICAL"/>
79+
<testCaseId value="MAGETWO-97001"/>
80+
<group value="checkout"/>
81+
</annotations>
82+
<before>
83+
<magentoCLI stepKey="disableSidebar" command="config:set checkout/sidebar/display 0" />
84+
</before>
85+
<after>
86+
<magentoCLI stepKey="enableSidebar" command="config:set checkout/sidebar/display 1" />
87+
</after>
88+
<remove keyForRemoval="guestGoToCheckoutFromMinicart" />
89+
<actionGroup ref="GoToCheckoutFromCartActionGroup" stepKey="guestGoToCheckoutFromCart" after="seeCartQuantity" />
90+
</test>
7291
<test name="StorefrontGuestCheckoutTestWithRestrictedCountriesForPayment">
7392
<annotations>
7493
<features value="Checkout"/>

app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
</div>
4242
<?= $block->getChildHtml('minicart.addons') ?>
4343
</div>
44+
<?php else: ?>
45+
<script>
46+
require(['jquery'], function ($) {
47+
$('a.action.showcart').click(function() {
48+
$(document.body).trigger('processStart');
49+
});
50+
});
51+
</script>
4452
<?php endif ?>
4553
<script>
4654
window.checkout = <?= /* @escapeNotVerified */ $block->getSerializedConfig() ?>;

0 commit comments

Comments
 (0)