File tree Expand file tree Collapse file tree 4 files changed +97
-0
lines changed
app/code/Magento/GiftMessage/Test/Mftf Expand file tree Collapse file tree 4 files changed +97
-0
lines changed Original file line number Diff line number Diff line change
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 =" AssertStorefrontGiftMessageOnCheckoutCartPageActionGroup" >
12
+ <annotations >
13
+ <description >Check that Gift Message for order present on checkout cart page.</description >
14
+ </annotations >
15
+
16
+ <waitForElementVisible selector =" {{StorefrontOrderGiftSection.giftMessageTitle}}" stepKey =" waitTitleOnThePage" />
17
+ <see selector =" {{StorefrontOrderGiftSection.giftMessageTitle}}" userInput =" Gift options" stepKey =" seeTitleOnThePage" />
18
+ <click selector =" {{StorefrontOrderGiftSection.giftMessageTitle}}" stepKey =" openGiftMessageForm" />
19
+ <scrollTo selector =" {{StorefrontOrderGiftSection.giftMessageToLabel}}" stepKey =" scrollToTitleOnThePage" />
20
+ <see selector =" {{StorefrontOrderGiftSection.giftMessageToLabel}}" userInput =" To:" stepKey =" seeTitleFromLabel" />
21
+ <see selector =" {{StorefrontOrderGiftSection.giftMessageFromLabel}}" userInput =" From:" stepKey =" seeTitleToLabel" />
22
+ <see selector =" {{StorefrontOrderGiftSection.giftMessageMessageLabel}}" userInput =" Message:" stepKey =" seeMessageLabel" />
23
+ </actionGroup >
24
+ </actionGroups >
Original file line number Diff line number Diff line change
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 =" StorefrontFieldGiftMessageCartFormActionGroup" >
12
+ <annotations >
13
+ <description >Fill gift messages for order.</description >
14
+ </annotations >
15
+ <fillField selector =" {{StorefrontOrderGiftSection.giftMessageToField}}" userInput =" Josh" stepKey =" fillToField" />
16
+ <fillField selector =" {{StorefrontOrderGiftSection.giftMessageFromField}}" userInput =" July" stepKey =" fillFromField" />
17
+ <fillField selector =" {{StorefrontOrderGiftSection.giftMessageTextField}}" userInput =" Best wishes!" stepKey =" fillMessageField" />
18
+ <click selector =" {{StorefrontOrderGiftSection.giftMessageUpdateButton}}" stepKey =" saveGiftMessage" />
19
+ <waitForPageLoad stepKey =" waitForPageLoaded" />
20
+ <scrollTo selector =" {{StorefrontOrderGiftSection.giftMessageSummary}}" stepKey =" scrollToGiftMessage" />
21
+ <see selector =" {{StorefrontOrderGiftSection.giftMessageSummary}}" userInput =" Best wishes!" stepKey =" seeGiftMessage" />
22
+ </actionGroup >
23
+ </actionGroups >
Original file line number Diff line number Diff line change 11
11
<section name =" StorefrontOrderGiftSection" >
12
12
<element name =" giftMessageLink" type =" button" selector =" .table-wrapper.order-items .options .action.show" />
13
13
<element name =" giftMessage" type =" text" selector =" .order-gift-message .item-message" />
14
+ <element name =" giftMessageTitle" type =" text" selector =" .cart-gift-item > .gift-item-block > .title > span" />
15
+ <element name =" giftMessageToLabel" type =" text" selector =" .gift-options-content .field-to .label span" />
16
+ <element name =" giftMessageFromLabel" type =" text" selector =" .gift-options-content .field-from .label span" />
17
+ <element name =" giftMessageMessageLabel" type =" text" selector =" .gift-options-content .text .label span" />
18
+ <element name =" giftMessageToField" type =" input" selector =" .gift-options-content .field-to input" />
19
+ <element name =" giftMessageFromField" type =" input" selector =" .gift-options-content .field-from input" />
20
+ <element name =" giftMessageTextField" type =" input" selector =" .gift-options-content .text textarea" />
21
+ <element name =" giftMessageSummary" type =" text" selector =" .gift-message-summary" />
22
+ <element name =" giftMessageUpdateButton" type =" button" selector =" button.action-update" />
14
23
</section >
15
24
</sections >
Original file line number Diff line number Diff line change
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 =" StorefrontGiftMessageForOrderOnCheckoutCartPageTest" >
12
+ <annotations >
13
+ <stories value =" Gift Message for order present on checkout cart page." />
14
+ <title value =" Gift Message for order present on checkout cart page." />
15
+ <description value =" Gift Message for order present on checkout cart page." />
16
+ <severity value =" MAJOR" />
17
+ </annotations >
18
+ <before >
19
+ <magentoCLI command =" config:set sales/gift_options/allow_order 1" stepKey =" enableGiftMessageForOrder" />
20
+
21
+ <createData entity =" SimpleProduct2" stepKey =" simpleProduct" />
22
+
23
+ <actionGroup ref =" CliCacheCleanActionGroup" stepKey =" cleanInvalidatedCaches" >
24
+ <argument name =" tags" value =" config full_page" />
25
+ </actionGroup >
26
+ </before >
27
+ <after >
28
+ <magentoCLI command =" config:set sales/gift_options/allow_order 0" stepKey =" disableGiftMessageForOrder" />
29
+ <deleteData createDataKey =" simpleProduct" stepKey =" deleteProduct" />
30
+ </after >
31
+
32
+ <actionGroup ref =" AddSimpleProductToCartActionGroup" stepKey =" addProductToCart" >
33
+ <argument name =" product" value =" $$simpleProduct$$" />
34
+ </actionGroup >
35
+
36
+ <actionGroup ref =" StorefrontCartPageOpenActionGroup" stepKey =" goToCartPage" />
37
+ <actionGroup ref =" AssertStorefrontGiftMessageOnCheckoutCartPageActionGroup" stepKey =" seeGiftMessageFields" />
38
+ <actionGroup ref =" StorefrontFieldGiftMessageCartFormActionGroup" stepKey =" fillGiftMessageFields" />
39
+ </test >
40
+ </tests >
41
+
You can’t perform that action at this time.
0 commit comments