Skip to content

Commit f5071e6

Browse files
committed
ACP2E-1551: Customer cannot use a distinct coupon code from the same Cart Price Rule.
1 parent 3255fda commit f5071e6

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,14 @@
4242
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
4343
</after>
4444

45-
<!-- Create a cart price rule -->
45+
<!-- Create a cart price rule -->
4646
<actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/>
4747
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
4848
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{_defaultCoupon.code}}" stepKey="fillRuleName"/>
4949
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
50-
<!-- Select custom customer groups -->
51-
<click selector="{{CartPriceRuleSection.customerGroupsToggle}}" stepKey="clickCustomerGroupsToggle" after="selectWebsites"/>
52-
<click selector="{{CartPriceRuleSection.selectAll}}" stepKey="clickSelectAll" after="clickCustomerGroupsToggle"/>
53-
<click selector="{{CartPriceRuleSection.doneButton}}" stepKey="clickDoneButton" after="clickSelectAll"/>
50+
<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="General" stepKey="selectCustomerGroup"/>
5451
<!-- Choose coupon type auto -->
5552
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Auto" stepKey="selectCouponType"/>
56-
<!-- Verify `Use Auto Generation` checkbox not visible while `Uses per Coupon` field there for coupon type auto-->
57-
<dontSeeCheckboxIsChecked selector="{{AdminCartPriceRulesFormSection.useAutoGeneration}}" stepKey="tickAutoGeneration"/>
5853
<fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="1" stepKey="fillUsesPerCoupon"/>
5954
<!--Open Actions tabs, fill required field and save the cart price rule-->
6055
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
@@ -108,8 +103,8 @@
108103

109104
<!-- Go to Checkout and Click Place Order button -->
110105
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
111-
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}"
112-
stepKey="selectFlatShippingMethod"/>
106+
<waitForPageLoad time="5" stepKey="waitForPageLoad2"/>
107+
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" stepKey="selectFlatShippingMethod"/>
113108
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
114109
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
115110
<!-- Checkout select Check/Money Order payment -->
@@ -124,7 +119,7 @@
124119

125120
<!-- Open the Product Page again, add the product to Cart, go to Shopping Cart and Apply the second coupon code -->
126121
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage2"/>
127-
<waitForPageLoad stepKey="waitForPageLoad2"/>
122+
<waitForPageLoad stepKey="waitForPageLoad3"/>
128123
<actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule2">
129124
<argument name="product" value="$$createSimpleProduct$$"/>
130125
<argument name="couponCode" value="{$couponCode2}"/>

0 commit comments

Comments
 (0)