Skip to content

Commit 7436d57

Browse files
add mftf
1 parent 7939d99 commit 7436d57

File tree

3 files changed

+52
-2
lines changed

3 files changed

+52
-2
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<element name="addToCartBtn" type="button" selector="button.action.tocart.primary" timeout="30"/>
1414
<element name="successMsg" type="button" selector="div.message-success" timeout="30"/>
1515
<element name="errorMsg" type="button" selector="div.message-error" timeout="30"/>
16-
<element name="alertMessage" type="text" selector=".page.messages [role=alert][aria-atomic=true]"/>
16+
<element name="alertMessage" type="text" selector=".page.messages [role=alert]"/>
1717
<element name="messagesBlock" type="text" selector=".page.messages" timeout="30"/>
1818
<element name="addToWishlist" type="button" selector="//a[@class='action towishlist']" timeout="30"/>
1919
<element name="customTextOptionInput" type="input" selector=".input-text.product-custom-option"/>

app/code/Magento/SalesRule/Test/Mftf/Section/DiscountSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<element name="DiscountInput" type="input" selector="#discount-code"/>
1414
<element name="ApplyCodeBtn" type="button" selector="//span[text()='Apply Discount']"/>
1515
<element name="CancelCoupon" type="button" selector="//button[@value='Cancel Coupon']"/>
16-
<element name="DiscountVerificationMsg" type="text" selector=".message-success[aria-atomic=true] div"/>
16+
<element name="DiscountVerificationMsg" type="text" selector=".message-success div"/>
17+
<element name="DiscountVerificationMsgWithAriaAtomicProperty" type="text" selector=".message-success[aria-atomic=true] div"/>
1718
<element name="CancelCouponBtn" type="button" selector="#discount-form .action-cancel"/>
1819
</section>
1920
</sections>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StoreFrontCheckNotificationMessageContainerTest">
12+
<annotations>
13+
<title value="Check notification message container"/>
14+
<description value="Check aria-atomic property on notification container message"/>
15+
<severity value="AVERAGE"/>
16+
<group value="Theme"/>
17+
</annotations>
18+
<before>
19+
<createData entity="SimpleProduct2" stepKey="simpleProduct"/>
20+
<createData entity="SalesRuleSpecificCouponAndByPercent" stepKey="createSalesRule"/>
21+
<createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule">
22+
<requiredEntity createDataKey="createSalesRule"/>
23+
</createData>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
27+
<deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/>
28+
</after>
29+
30+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="openProductPageAndVerifyProduct">
31+
<argument name="product" value="$$simpleProduct$$"/>
32+
</actionGroup>
33+
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addProductToTheCart">
34+
<argument name="productQty" value="1"/>
35+
</actionGroup>
36+
37+
<waitForElementVisible selector="{{StorefrontProductPageSection.alertMessage}}[aria-atomic=true]" stepKey="checkAddedToCartMessage"/>
38+
39+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
40+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
41+
<argument name="shippingMethod" value="Flat Rate"/>
42+
</actionGroup>
43+
<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyCoupon">
44+
<argument name="discountCode" value="$createCouponForCartPriceRule.code$"/>
45+
</actionGroup>
46+
47+
<waitForElementVisible selector="{{DiscountSection.DiscountVerificationMsgWithAriaAtomicProperty}}" stepKey="checkCouponCodeApply"/>
48+
</test>
49+
</tests>

0 commit comments

Comments
 (0)