Skip to content

Commit e7cbe45

Browse files
committed
Merge remote-tracking branch 'origin/AC-5985-dev' into Spartans_246_quality_graphql_mainlinepr
2 parents 02dfb4f + 3e2ce98 commit e7cbe45

File tree

3 files changed

+111
-1
lines changed

3 files changed

+111
-1
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="OnePageCheckoutForErrorTest">
11+
<annotations>
12+
<features value="Checkout"/>
13+
<stories value="Checkout Free Shipping Recalculation after Coupon Code Added For Error Message Check"/>
14+
<title value="Checkout Free Shipping Recalculation after Coupon Code Added For Error Message Check"/>
15+
<description value="User should be able to do checkout free shipping recalculation after adding coupon code"/>
16+
<severity value="BLOCKER"/>
17+
<testCaseId value="MC-28548"/>
18+
<useCaseId value="MAGETWO-96431"/>
19+
<group value="Checkout"/>
20+
</annotations>
21+
22+
<before>
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer">
24+
<field key="group_id">1</field>
25+
</createData>
26+
<createData entity="_defaultCategory" stepKey="defaultCategory"/>
27+
<createData entity="_defaultProduct" stepKey="simpleProduct">
28+
<field key="price">90</field>
29+
<requiredEntity createDataKey="defaultCategory"/>
30+
</createData>
31+
<!--It is default for FlatRate-->
32+
<createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/>
33+
<createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>
34+
<createData entity="MinimumOrderAmount90" stepKey="minimumOrderAmount90"/>
35+
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
36+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
37+
<actionGroup ref="AdminCartPriceRuleDeleteAllActionGroup" stepKey="deleteAllCartPriceRules"/>
38+
<actionGroup ref="AdminCreateCartPriceRuleWithCouponCodeActionGroup" stepKey="createCartPriceRule">
39+
<argument name="ruleName" value="CatPriceRule"/>
40+
<argument name="couponCode" value="CatPriceRule.coupon_code"/>
41+
</actionGroup>
42+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStoreFront">
43+
<argument name="Customer" value="$createCustomer$"/>
44+
</actionGroup>
45+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
46+
<argument name="productUrl" value="$simpleProduct.custom_attributes[url_key]$"/>
47+
</actionGroup>
48+
</before>
49+
50+
<after>
51+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
52+
<deleteData createDataKey="defaultCategory" stepKey="deleteCategory"/>
53+
<createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/>
54+
<createData entity="DefaultMinimumOrderAmount" stepKey="defaultMinimumOrderAmount"/>
55+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
56+
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
57+
<actionGroup ref="AdminCartPriceRuleDeleteAllActionGroup" stepKey="deleteAllCartPriceRules"/>
58+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
59+
</after>
60+
61+
<actionGroup ref="AddProductToStorefrontActionGroup" stepKey="addToCartProduct">
62+
<argument name="product" value="$simpleProduct$"/>
63+
</actionGroup>
64+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart1"/>
65+
66+
67+
<waitForPageLoad stepKey="waitForShippingMethods"/>
68+
<click selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Free')}}" stepKey="chooseFreeShipping"/>
69+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextAfterFreeShippingMethodSelection"/>
70+
<waitForPageLoad stepKey="waitForReviewAndPayments"/>
71+
<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyCouponCode">
72+
<argument name="discountCode" value="{{CatPriceRule.coupon_code}}"/>
73+
</actionGroup>
74+
<!-- Assert order cannot be placed and error message will shown. -->
75+
<actionGroup ref="AssertStorefrontOrderIsNotPlacedActionGroup" stepKey="seeShippingMethodError">
76+
<argument name="error" value="The shipping method is missing. Select the shipping method and try again."/>
77+
</actionGroup>
78+
</test>
79+
</tests>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AddProductToStorefrontActionGroup">
12+
<annotations>
13+
<description>Clicks on Add to Cart on a Storefront Product page. Validates that the Success Message is present and correct. Goes to the Storefront Shopping Cart page. Applies the provided Coupon Code to the Shopping Cart.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
</arguments>
18+
19+
<waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartDisabled}}" stepKey="waitForAddToCartButtonToRemoveDisabledState"/>
20+
<waitForElementClickable selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/>
21+
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
22+
<waitForPageLoad stepKey="waitForAddToCart"/>
23+
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
24+
<waitForText userInput="You added {{product.name}} to your shopping cart." stepKey="waitForText"/>
25+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckoutPage"/>
26+
<waitForPageLoad stepKey="waitForPageLoad1"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/Ui/view/frontend/web/js/view/messages.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ define([
6868
// Hide message block if needed
6969
if (isHidden) {
7070
setTimeout(function () {
71-
$(this.selector).hide('blind', {}, this.hideSpeed);
71+
$(this.selector).hide('slow');
72+
73+
//commented because effect-blind.js(1.13.1) is having show & hide issue
74+
// $(this.selector).hide('blind', {}, this.hideSpeed);
7275
}.bind(this), this.hideTimeout);
7376
}
7477
}

0 commit comments

Comments
 (0)