Skip to content

Commit e4b40af

Browse files
author
Stas Puga
committed
MAGETWO-95518: Add different types of products on the quote including gift card
1 parent 7482199 commit e4b40af

File tree

7 files changed

+62
-6
lines changed

7 files changed

+62
-6
lines changed

app/code/Magento/Bundle/Test/Mftf/Page/StorefrontProductPage.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
-->
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="StorefrontProductPage" url="/{{var1}}.html" area="storefront" module="Magento_Catalog" parameterized="true">
1212
<section name="StorefrontBundledSection"/>
13+
<section name="StorefrontBundleProductActionSection"/>
1314
</page>
1415
</pages>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="StorefrontBundleProductActionSection">
11+
<element name="customizeAndAddToCartButton" type="button" selector="#bundle-slide"/>
12+
<element name="quantityField" type="input" selector="#qty"/>
13+
<element name="addToCartButton" type="button" selector="#product-addtocart-button"/>
14+
</section>
15+
</sections>

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductInfoMainSection">
1212
<element name="priceFrom" type="text" selector=".product-info-price .price-from"/>
1313
<element name="priceTo" type="text" selector=".product-info-price .price-to"/>
1414
<element name="minPrice" type="text" selector="span[data-price-type='minPrice']"/>
1515
<element name="maxPrice" type="text" selector="span[data-price-type='minPrice']"/>
16+
<element name="productBundleOptionsCheckbox" type="checkbox" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{childName}}')]/../input" parameterized="true" timeout="30"/>
1617
</section>
1718
</sections>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeActionGroup.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,11 @@
2525
<click selector="{{AttributePropertiesSection.save}}" stepKey="saveAttribute"/>
2626
<see selector="{{AdminMessagesSection.successMessage}}" userInput="You saved the product attribute." stepKey="successMessage"/>
2727
</actionGroup>
28+
<actionGroup name="deleteProductAttribute" extends="navigateToCreatedProductAttribute">
29+
<click selector="{{AttributePropertiesSection.DeleteAttribute}}" stepKey="deleteAttribute"/>
30+
<click selector="{{ModalConfirmationSection.OkButton}}" stepKey="ClickOnDeleteButton"/>
31+
<waitForPageLoad stepKey="waitForPageLoad"/>
32+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}"
33+
stepKey="waitForSuccessMessage"/>
34+
</actionGroup>
2835
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeOptionData.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="productAttributeOption1" type="ProductAttributeOption">
1212
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
1313
<data key="label" unique="suffix">option1</data>
@@ -59,4 +59,20 @@
5959
<requiredEntity type="StoreLabel">Option6Store0</requiredEntity>
6060
<requiredEntity type="StoreLabel">Option6Store1</requiredEntity>
6161
</entity>
62+
<entity name="ProductAttributeOption7" type="ProductAttributeOption">
63+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
64+
<data key="label" unique="suffix">Green</data>
65+
<data key="is_default">false</data>
66+
<data key="sort_order">3</data>
67+
<requiredEntity type="StoreLabel">Option7Store0</requiredEntity>
68+
<requiredEntity type="StoreLabel">Option8Store1</requiredEntity>
69+
</entity>
70+
<entity name="ProductAttributeOption8" type="ProductAttributeOption">
71+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
72+
<data key="label" unique="suffix">Red</data>
73+
<data key="is_default">false</data>
74+
<data key="sort_order">3</data>
75+
<requiredEntity type="StoreLabel">Option9Store0</requiredEntity>
76+
<requiredEntity type="StoreLabel">Option10Store1</requiredEntity>
77+
</entity>
6278
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/StoreLabelData.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="Option1Store0" type="StoreLabel">
1212
<data key="store_id">0</data>
1313
<data key="label">option1</data>
@@ -56,4 +56,20 @@
5656
<data key="store_id">1</data>
5757
<data key="label">option6</data>
5858
</entity>
59+
<entity name="Option7Store0" type="StoreLabel">
60+
<data key="store_id">0</data>
61+
<data key="label">Green</data>
62+
</entity>
63+
<entity name="Option8Store1" type="StoreLabel">
64+
<data key="store_id">1</data>
65+
<data key="label">Green</data>
66+
</entity>
67+
<entity name="Option9Store0" type="StoreLabel">
68+
<data key="store_id">0</data>
69+
<data key="label">Red</data>
70+
</entity>
71+
<entity name="Option10Store1" type="StoreLabel">
72+
<data key="store_id">1</data>
73+
<data key="label">Red</data>
74+
</entity>
5975
</entities>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductPageSection">
12-
<element name="QtyInput" type="button" selector="input.input-text.qty"/>
12+
<element name="qtyInput" type="button" selector="input.input-text.qty"/>
1313
<element name="addToCartBtn" type="button" selector="button.action.tocart.primary"/>
1414
<element name="successMsg" type="button" selector="div.message-success"/>
1515
<element name="addToWishlist" type="button" selector="a.action.towishlist" timeout="30"/>

0 commit comments

Comments
 (0)