-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6882 from magento-tsg/2.4-develop-pr148
[Arrows] Fixes for 2.4 (pr148) (2.4-develop)
- Loading branch information
Showing
10 changed files
with
182 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...e/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillCouponInfoActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminCartPriceRuleFillCouponInfoActionGroup"> | ||
<annotations> | ||
<description>Fill Cart Price Rule coupon info : Type, Code, Number of uses per coupon/customer.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="couponType" type="string" defaultValue="Specific Coupon"/> | ||
<argument name="couponCode" type="string" defaultValue="{{_defaultCoupon.code}}"/> | ||
<argument name="userPerCoupon" type="string" defaultValue="500"/> | ||
<argument name="userPerCustomer" type="string" defaultValue="1"/> | ||
</arguments> | ||
|
||
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="{{couponType}}" stepKey="selectCouponType"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.couponCode}}" userInput="{{couponCode}}" stepKey="fillCouponCode"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="{{userPerCoupon}}" stepKey="setUserPerCoupon"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.userPerCustomer}}" userInput="{{userPerCustomer}}" stepKey="setUserPerCustomer"/> | ||
</actionGroup> | ||
</actionGroups> |
25 changes: 25 additions & 0 deletions
25
...to/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillShippingConditionActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminCartPriceRuleFillShippingConditionActionGroup"> | ||
<annotations> | ||
<description>Sets the provided Cart Attribute Shipping method condition type on the Admin Cart Price Rule creation/edit page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="shippingMethodName" type="string" defaultValue="[flatrate] Fixed"/> | ||
</arguments> | ||
<click selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" stepKey="openConditionsSection" /> | ||
<click selector="{{AdminCartPriceRulesFormSection.addCondition('1')}}" stepKey="addCondition"/> | ||
<selectOption selector="{{AdminCartPriceRulesFormSection.conditionSelectDropdown('1')}}" userInput="Shipping Method" stepKey="specifyCondition"/> | ||
<waitForPageLoad stepKey="waitForConditionLoad"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.targetEllipsis}}" stepKey="clickEllipsis"/> | ||
<selectOption selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1')}}" userInput="{{shippingMethodName}}" stepKey="selectShippingMethod"/> | ||
</actionGroup> | ||
</actionGroups> |
95 changes: 95 additions & 0 deletions
95
...hipping/Test/Mftf/Test/StorefrontAssertShippingPricesPresentAfterApplyingCartRuleTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontAssertShippingPricesPresentAfterApplyingCartRuleTest"> | ||
<annotations> | ||
<features value="Shipping"/> | ||
<stories value="Cart price rules"/> | ||
<title value="Assert that shipping methods prices will be correct after cart price rule applied"/> | ||
<description value="Shipping method prices should be displayed correctly on checkout after applied cart price rule"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MC-42229"/> | ||
<useCaseId value="MC-24379"/> | ||
<group value="shipping"/> | ||
<group value="SalesRule"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleProduct2" stepKey="createProduct"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> | ||
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite"> | ||
<argument name="website" value="_defaultWebsite"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethodForDefaultWebsite"> | ||
<argument name="status" value="1"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminImportFileTableRatesShippingMethodActionGroup" stepKey="importCSVFile"> | ||
<argument name="file" value="usa_tablerates.csv"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> | ||
<actionGroup ref="AdminCartPriceRuleDeleteAllActionGroup" stepKey="deleteAllExistingCartPriceRules"/> | ||
<actionGroup ref="AdminOpenNewCartPriceRuleFormPageActionGroup" stepKey="createCartPriceRule"/> | ||
<actionGroup ref="AdminCartPriceRuleFillMainInfoActionGroup" stepKey="fillCartPriceRuleMainInfo"> | ||
<argument name="name" value="{{CartPriceRuleConditionForSubtotalForMultiShipping.name}}"/> | ||
<argument name="description" value="{{CartPriceRuleConditionForSubtotalForMultiShipping.description}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCartPriceRuleFillCouponInfoActionGroup" stepKey="fillCartPriceRuleCouponInfo"/> | ||
<actionGroup ref="AdminCartPriceRuleFillShippingConditionActionGroup" stepKey="setCartAttributeConditionForCartPriceRule"/> | ||
<actionGroup ref="AdminCreateCartPriceRuleActionsSectionDiscountFieldsActionGroup" stepKey="fillCartPriceRuleActionsSection"> | ||
<argument name="rule" value="CartPriceRuleConditionForSubtotalForMultiShipping"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateCartPriceRuleActionsSectionFreeShippingActionGroup" stepKey="fillCartPriceRuleFreeShippingActionsSection"> | ||
<argument name="freeShippingOption" value="{{CartPriceRuleConditionForSubtotalForMultiShipping.simple_free_shipping}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCartPriceRuleSaveActionGroup" stepKey="saveCartPriceRule"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<actionGroup ref="AdminCartPriceRuleDeleteAllActionGroup" stepKey="deleteAllCartPriceRules"/> | ||
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage2"/> | ||
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite2"> | ||
<argument name="website" value="_defaultWebsite"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="disableTableRatesShippingMethodForDefaultWebsite"> | ||
<argument name="status" value="0"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig2"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
</after> | ||
|
||
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPage"> | ||
<argument name="productUrlKey" value="$createProduct.custom_attributes[url_key]$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> | ||
<argument name="product" value="$createProduct$" /> | ||
<argument name="productCount" value="1" /> | ||
</actionGroup> | ||
|
||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> | ||
|
||
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="guestCheckoutFillingShippingSection"> | ||
<argument name="customer" value="CustomerEntityOne" /> | ||
<argument name="address" value="CustomerAddressSimple" /> | ||
</actionGroup> | ||
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Fixed')}}" userInput="$5.00" stepKey="assertFlatRatedMethodPrice"/> | ||
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Table Rate')}}" userInput="$7.99" stepKey="assertTableRatedMethodPrice"/> | ||
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" stepKey="selectFlatRateShippingMethod"/> | ||
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="goToPaymentStep"/> | ||
<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyCoupon"> | ||
<argument name="discountCode" value="{{_defaultCoupon.code}}"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePageAfterCartRuleApplied"/> | ||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/> | ||
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Fixed')}}" userInput="$0.00" stepKey="assertFlatRatedMethodPriceAfterCartRule"/> | ||
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Table Rate')}}" userInput="$7.99" stepKey="assertTableRatedMethodPriceAfterCartRule"/> | ||
</test> | ||
</tests> |