Skip to content

Commit 34a9bee

Browse files
committed
MFTF Stability control
- fix unstable behaviour - fix an issue with Test Isolation
1 parent bdae533 commit 34a9bee

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="amOnPageShoppingCart"/>
1717
<waitForPageLoad stepKey="waitForCheckoutPageLoad"/>
18-
<see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/>
18+
<waitForText userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/>
1919
</actionGroup>
2020
</actionGroups>

app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminSalesRuleActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
<fillField selector="{{AdminCartPriceRulesSection.filterByNameInput}}" userInput="{{ruleName}}" stepKey="filterByName"/>
2222
<click selector="{{AdminCartPriceRulesSection.searchButton}}" stepKey="doFilter"/>
2323
<click selector="{{AdminCartPriceRulesSection.rowByIndex('1')}}" stepKey="goToEditRulePage"/>
24+
<waitForElementClickable selector="{{AdminCartPriceRulesFormSection.delete}}" stepKey="waitForDeleteButtonClickable" />
2425
<click selector="{{AdminCartPriceRulesFormSection.delete}}" stepKey="clickDeleteButton"/>
26+
<waitForElementClickable selector="{{AdminCartPriceRulesFormSection.modalAcceptButton}}" stepKey="waitForConfirmButtonClickable" />
2527
<click selector="{{AdminCartPriceRulesFormSection.modalAcceptButton}}" stepKey="confirmDelete"/>
2628
</actionGroup>
2729
</actionGroups>

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,16 @@
8282
</before>
8383

8484
<after>
85-
<actionGroup ref="DeleteCartPriceRuleByName" stepKey="DeleteCartPriceRuleByName">
86-
<argument name="ruleName" value="{{SimpleSalesRule.name}}"/>
87-
</actionGroup>
85+
8886
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
8987
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
9088
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
9189
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
9290
<deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/>
93-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
91+
<actionGroup ref="DeleteCartPriceRuleByName" stepKey="DeleteCartPriceRuleByName">
92+
<argument name="ruleName" value="{{SimpleSalesRule.name}}"/>
93+
</actionGroup>
94+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
9495

9596
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
9697
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
@@ -107,7 +108,7 @@
107108
<generateDate date="-1 day" format="m/d/Y" stepKey="yesterdayDate"/>
108109
<fillField selector="{{AdminCartPriceRulesFormSection.fromDate}}" userInput="{$yesterdayDate}" stepKey="fillFromDate"/>
109110
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Specific Coupon" stepKey="selectCouponType"/>
110-
<fillField selector="{{AdminCartPriceRulesFormSection.couponCode}}" userInput="ABCD" stepKey="fillCouponCOde"/>
111+
<fillField selector="{{AdminCartPriceRulesFormSection.couponCode}}" userInput="{{_defaultCoupon.code}}" stepKey="fillCouponCOde"/>
111112
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
112113
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="50" stepKey="fillDiscountAmount"/>
113114
<scrollTo selector="{{AdminCartPriceRulesFormSection.conditions}}" stepKey="ScrollToApplyRuleForConditions"/>
@@ -137,7 +138,7 @@
137138
<!--View and edit cart-->
138139
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="clickViewAndEditCartFromMiniCart"/>
139140
<click selector="{{DiscountSection.DiscountTab}}" stepKey="scrollToDiscountTab" />
140-
<fillField selector="{{DiscountSection.CouponInput}}" userInput="ABCD" stepKey="fillCouponCode" />
141+
<fillField selector="{{DiscountSection.CouponInput}}" userInput="{{_defaultCoupon.code}}" stepKey="fillCouponCode" />
141142
<click selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="applyCode"/>
142143
<waitForPageLoad stepKey="waitForPageLoad3"/>
143144
<see userInput="You used coupon code" stepKey="assertText"/>

0 commit comments

Comments
 (0)